diff options
author | Mark Haines <mark.haines@matrix.org> | 2016-03-04 14:44:34 +0000 |
---|---|---|
committer | Mark Haines <mark.haines@matrix.org> | 2016-03-04 14:44:34 +0000 |
commit | ec7460b4f2da70ae3ea4ddaa4a198d9dd193a045 (patch) | |
tree | 2dddf9f52591a392295bbace7a9494ab423c7cfd /tests/handlers/test_profile.py | |
parent | Hook up the push rules stream to account_data in /sync (diff) | |
parent | Merge pull request #598 from Rugvip/invite-state (diff) | |
download | synapse-ec7460b4f2da70ae3ea4ddaa4a198d9dd193a045.tar.xz |
Merge branch 'develop' into markjh/pushrule_stream
Diffstat (limited to 'tests/handlers/test_profile.py')
-rw-r--r-- | tests/handlers/test_profile.py | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/tests/handlers/test_profile.py b/tests/handlers/test_profile.py index a87703bbfd..4f2c14e4ff 100644 --- a/tests/handlers/test_profile.py +++ b/tests/handlers/test_profile.py @@ -23,7 +23,7 @@ from synapse.api.errors import AuthError from synapse.handlers.profile import ProfileHandler from synapse.types import UserID -from tests.utils import setup_test_homeserver +from tests.utils import setup_test_homeserver, requester_for_user class ProfileHandlers(object): @@ -84,7 +84,11 @@ class ProfileTestCase(unittest.TestCase): @defer.inlineCallbacks def test_set_my_name(self): - yield self.handler.set_displayname(self.frank, self.frank, "Frank Jr.") + yield self.handler.set_displayname( + self.frank, + requester_for_user(self.frank), + "Frank Jr." + ) self.assertEquals( (yield self.store.get_profile_displayname(self.frank.localpart)), @@ -93,7 +97,11 @@ class ProfileTestCase(unittest.TestCase): @defer.inlineCallbacks def test_set_my_name_noauth(self): - d = self.handler.set_displayname(self.frank, self.bob, "Frank Jr.") + d = self.handler.set_displayname( + self.frank, + requester_for_user(self.bob), + "Frank Jr." + ) yield self.assertFailure(d, AuthError) @@ -136,7 +144,7 @@ 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" + self.frank, requester_for_user(self.frank), "http://my.server/pic.gif" ) self.assertEquals( |