summary refs log tree commit diff
path: root/tests/storage/test_background_update.py
diff options
context:
space:
mode:
authorAmber Brown <hawkowl@atleastfornow.net>2018-08-11 00:12:56 +1000
committerGitHub <noreply@github.com>2018-08-11 00:12:56 +1000
commita001038b92c4f0082cad60e5e87d0bd01374c9de (patch)
treea1d678eb7fbaa0f9715bb0e751d6e3c6e52cb3f0 /tests/storage/test_background_update.py
parentMerge branch 'rav/fix_linearizer_cancellation' into develop (diff)
parentfix up a forced long line (diff)
downloadsynapse-a001038b92c4f0082cad60e5e87d0bd01374c9de.tar.xz
Merge pull request #3679 from matrix-org/hawkowl/blackify-tests
Blackify the tests
Diffstat (limited to 'tests/storage/test_background_update.py')
-rw-r--r--tests/storage/test_background_update.py17
1 files changed, 4 insertions, 13 deletions
diff --git a/tests/storage/test_background_update.py b/tests/storage/test_background_update.py
index ab1f310572..b4f6baf441 100644
--- a/tests/storage/test_background_update.py
+++ b/tests/storage/test_background_update.py
@@ -7,7 +7,6 @@ from tests.utils import setup_test_homeserver
 
 
 class BackgroundUpdateTestCase(unittest.TestCase):
-
     @defer.inlineCallbacks
     def setUp(self):
         hs = yield setup_test_homeserver()  # type: synapse.server.HomeServer
@@ -51,9 +50,7 @@ class BackgroundUpdateTestCase(unittest.TestCase):
         yield self.store.start_background_update("test_update", {"my_key": 1})
 
         self.update_handler.reset_mock()
-        result = yield self.store.do_next_background_update(
-            duration_ms * desired_count
-        )
+        result = yield self.store.do_next_background_update(duration_ms * desired_count)
         self.assertIsNotNone(result)
         self.update_handler.assert_called_once_with(
             {"my_key": 1}, self.store.DEFAULT_BACKGROUND_BATCH_SIZE
@@ -67,18 +64,12 @@ class BackgroundUpdateTestCase(unittest.TestCase):
 
         self.update_handler.side_effect = update
         self.update_handler.reset_mock()
-        result = yield self.store.do_next_background_update(
-            duration_ms * desired_count
-        )
+        result = yield self.store.do_next_background_update(duration_ms * desired_count)
         self.assertIsNotNone(result)
-        self.update_handler.assert_called_once_with(
-            {"my_key": 2}, desired_count
-        )
+        self.update_handler.assert_called_once_with({"my_key": 2}, desired_count)
 
         # third step: we don't expect to be called any more
         self.update_handler.reset_mock()
-        result = yield self.store.do_next_background_update(
-            duration_ms * desired_count
-        )
+        result = yield self.store.do_next_background_update(duration_ms * desired_count)
         self.assertIsNone(result)
         self.assertFalse(self.update_handler.called)