summary refs log tree commit diff
path: root/tests/handlers/test_directory.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/handlers/test_directory.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/handlers/test_directory.py')
-rw-r--r--tests/handlers/test_directory.py22
1 files changed, 7 insertions, 15 deletions
diff --git a/tests/handlers/test_directory.py b/tests/handlers/test_directory.py
index a353070316..06de9f5eca 100644
--- a/tests/handlers/test_directory.py
+++ b/tests/handlers/test_directory.py
@@ -42,6 +42,7 @@ class DirectoryTestCase(unittest.TestCase):
 
         def register_query_handler(query_type, handler):
             self.query_handlers[query_type] = handler
+
         self.mock_registry.register_query_handler = register_query_handler
 
         hs = yield setup_test_homeserver(
@@ -68,10 +69,7 @@ class DirectoryTestCase(unittest.TestCase):
 
         result = yield self.handler.get_association(self.my_room)
 
-        self.assertEquals({
-            "room_id": "!8765qwer:test",
-            "servers": ["test"],
-        }, result)
+        self.assertEquals({"room_id": "!8765qwer:test", "servers": ["test"]}, result)
 
     @defer.inlineCallbacks
     def test_get_remote_association(self):
@@ -81,16 +79,13 @@ class DirectoryTestCase(unittest.TestCase):
 
         result = yield self.handler.get_association(self.remote_room)
 
-        self.assertEquals({
-            "room_id": "!8765qwer:test",
-            "servers": ["test", "remote"],
-        }, result)
+        self.assertEquals(
+            {"room_id": "!8765qwer:test", "servers": ["test", "remote"]}, result
+        )
         self.mock_federation.make_query.assert_called_with(
             destination="remote",
             query_type="directory",
-            args={
-                "room_alias": "#another:remote",
-            },
+            args={"room_alias": "#another:remote"},
             retry_on_dns_fail=False,
             ignore_backoff=True,
         )
@@ -105,7 +100,4 @@ class DirectoryTestCase(unittest.TestCase):
             {"room_alias": "#your-room:test"}
         )
 
-        self.assertEquals({
-            "room_id": "!8765asdf:test",
-            "servers": ["test"],
-        }, response)
+        self.assertEquals({"room_id": "!8765asdf:test", "servers": ["test"]}, response)