diff options
author | Mark Haines <mjark@negativecurvature.net> | 2016-02-19 15:55:02 +0000 |
---|---|---|
committer | Mark Haines <mjark@negativecurvature.net> | 2016-02-19 15:55:02 +0000 |
commit | b82d6f70a49faaf551e7709ddfd7a7607ade3e42 (patch) | |
tree | f13b8706f7cdc4faa6e44e207fd57d3cfe30f97f /tests/handlers/test_profile.py | |
parent | Add Measures to presence (diff) | |
parent | Fix flake8 warnings for tests (diff) | |
download | synapse-b82d6f70a49faaf551e7709ddfd7a7607ade3e42.tar.xz |
Merge pull request #590 from matrix-org/markjh/formatting
Fix flake8 warnings for tests
Diffstat (limited to 'tests/handlers/test_profile.py')
-rw-r--r-- | tests/handlers/test_profile.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/tests/handlers/test_profile.py b/tests/handlers/test_profile.py index 95c87f0ebd..a87703bbfd 100644 --- a/tests/handlers/test_profile.py +++ b/tests/handlers/test_profile.py @@ -41,8 +41,10 @@ class ProfileTestCase(unittest.TestCase): ]) self.query_handlers = {} + def register_query_handler(query_type, handler): self.query_handlers[query_type] = handler + self.mock_federation.register_query_handler = register_query_handler hs = yield setup_test_homeserver( @@ -63,7 +65,7 @@ class ProfileTestCase(unittest.TestCase): self.store = hs.get_datastore() self.frank = UserID.from_string("@1234ABCD:test") - self.bob = UserID.from_string("@4567:test") + self.bob = UserID.from_string("@4567:test") self.alice = UserID.from_string("@alice:remote") yield self.store.create_profile(self.frank.localpart) @@ -133,8 +135,9 @@ class ProfileTestCase(unittest.TestCase): @defer.inlineCallbacks def test_set_my_avatar(self): - yield self.handler.set_avatar_url(self.frank, self.frank, - "http://my.server/pic.gif") + yield self.handler.set_avatar_url( + self.frank, self.frank, "http://my.server/pic.gif" + ) self.assertEquals( (yield self.store.get_profile_avatar_url(self.frank.localpart)), |