Make do_next_background_update return a bool

returning a None or an int that we don't use is confusing.
This commit is contained in:
Richard van der Hoff 2020-03-31 17:31:32 +01:00
parent 51f4d52cb4
commit b4c2234232
2 changed files with 8 additions and 10 deletions

View file

@ -56,7 +56,7 @@ class BackgroundUpdateTestCase(unittest.HomeserverTestCase):
),
by=0.1,
)
self.assertIsNotNone(res)
self.assertFalse(res)
# on the first call, we should get run with the default background update size
self.update_handler.assert_called_once_with(
@ -79,7 +79,7 @@ class BackgroundUpdateTestCase(unittest.HomeserverTestCase):
result = self.get_success(
self.updates.do_next_background_update(target_background_update_duration_ms)
)
self.assertIsNotNone(result)
self.assertFalse(result)
self.update_handler.assert_called_once()
# third step: we don't expect to be called any more
@ -87,5 +87,5 @@ class BackgroundUpdateTestCase(unittest.HomeserverTestCase):
result = self.get_success(
self.updates.do_next_background_update(target_background_update_duration_ms)
)
self.assertIsNone(result)
self.assertTrue(result)
self.assertFalse(self.update_handler.called)