diff options
author | black <bot@matrix.org> | 2018-08-10 23:54:09 +1000 |
---|---|---|
committer | Amber Brown <hawkowl@atleastfornow.net> | 2018-08-10 23:54:09 +1000 |
commit | 8b3d9b6b199abb87246f982d5db356f1966db925 (patch) | |
tree | babc8de046f9bfb6c960f39175b82b0cf0c3274f /tests/handlers/test_directory.py | |
parent | Rename async to async_helpers because `async` is a keyword on Python 3.7 (#3678) (diff) | |
download | synapse-8b3d9b6b199abb87246f982d5db356f1966db925.tar.xz |
Run black.
Diffstat (limited to 'tests/handlers/test_directory.py')
-rw-r--r-- | tests/handlers/test_directory.py | 22 |
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) |