|
@@ -101,6 +101,10 @@ class MonitorConsumerTest(TestCase):
|
|
|
assert monitor_environment.next_checkin == monitor.get_next_scheduled_checkin_with_margin(
|
|
|
checkin.date_added
|
|
|
)
|
|
|
+ assert (
|
|
|
+ monitor_environment.next_checkin_latest
|
|
|
+ == monitor.get_next_scheduled_checkin_with_margin(checkin.date_added)
|
|
|
+ )
|
|
|
|
|
|
# Process another check-in to verify we set an expected time for the next check-in
|
|
|
expected_time = monitor_environment.next_checkin
|
|
@@ -124,6 +128,10 @@ class MonitorConsumerTest(TestCase):
|
|
|
assert monitor_environment.next_checkin == monitor.get_next_scheduled_checkin_with_margin(
|
|
|
checkin.date_added
|
|
|
)
|
|
|
+ assert (
|
|
|
+ monitor_environment.next_checkin_latest
|
|
|
+ == monitor.get_next_scheduled_checkin_with_margin(checkin.date_added)
|
|
|
+ )
|
|
|
|
|
|
# Process another check-in to verify we set an expected time for the next check-in
|
|
|
expected_time = monitor_environment.next_checkin
|
|
@@ -145,6 +153,10 @@ class MonitorConsumerTest(TestCase):
|
|
|
assert monitor_environment.next_checkin == monitor.get_next_scheduled_checkin_with_margin(
|
|
|
checkin.date_added
|
|
|
)
|
|
|
+ assert (
|
|
|
+ monitor_environment.next_checkin_latest
|
|
|
+ == monitor.get_next_scheduled_checkin_with_margin(checkin.date_added)
|
|
|
+ )
|
|
|
|
|
|
def test_disabled(self):
|
|
|
monitor = self._create_monitor(status=ObjectStatus.DISABLED)
|
|
@@ -162,6 +174,10 @@ class MonitorConsumerTest(TestCase):
|
|
|
assert monitor_environment.next_checkin == monitor.get_next_scheduled_checkin_with_margin(
|
|
|
checkin.date_added
|
|
|
)
|
|
|
+ assert (
|
|
|
+ monitor_environment.next_checkin_latest
|
|
|
+ == monitor.get_next_scheduled_checkin_with_margin(checkin.date_added)
|
|
|
+ )
|
|
|
|
|
|
def test_create_lock(self):
|
|
|
monitor = self._create_monitor(slug="my-monitor")
|
|
@@ -256,6 +272,10 @@ class MonitorConsumerTest(TestCase):
|
|
|
assert monitor_environment.next_checkin == monitor.get_next_scheduled_checkin_with_margin(
|
|
|
checkin.date_added
|
|
|
)
|
|
|
+ assert (
|
|
|
+ monitor_environment.next_checkin_latest
|
|
|
+ == monitor.get_next_scheduled_checkin_with_margin(checkin.date_added)
|
|
|
+ )
|
|
|
|
|
|
def test_monitor_create(self):
|
|
|
self.send_message(
|
|
@@ -277,6 +297,12 @@ class MonitorConsumerTest(TestCase):
|
|
|
checkin.date_added
|
|
|
)
|
|
|
)
|
|
|
+ assert (
|
|
|
+ monitor_environment.next_checkin_latest
|
|
|
+ == monitor_environment.monitor.get_next_scheduled_checkin_with_margin(
|
|
|
+ checkin.date_added
|
|
|
+ )
|
|
|
+ )
|
|
|
|
|
|
def test_monitor_update(self):
|
|
|
monitor = self._create_monitor(slug="my-monitor")
|
|
@@ -302,6 +328,12 @@ class MonitorConsumerTest(TestCase):
|
|
|
checkin.date_added
|
|
|
)
|
|
|
)
|
|
|
+ assert (
|
|
|
+ monitor_environment.next_checkin_latest
|
|
|
+ == monitor_environment.monitor.get_next_scheduled_checkin_with_margin(
|
|
|
+ checkin.date_added
|
|
|
+ )
|
|
|
+ )
|
|
|
|
|
|
def test_check_in_empty_id(self):
|
|
|
monitor = self._create_monitor(slug="my-monitor")
|