diff options
author | Mark Haines <mjark@negativecurvature.net> | 2015-01-23 10:55:18 +0000 |
---|---|---|
committer | Mark Haines <mjark@negativecurvature.net> | 2015-01-23 10:55:18 +0000 |
commit | 7dfd99f16354801ed51a3a5a99b3ea6db1e670d4 (patch) | |
tree | c43a9fe9ca6d8713e376f56e5689bf71aa53f03d /tests/rest/client | |
parent | Rename MockedDatastoreTestCase to MockedDatastorePresenceTestCase since it is... (diff) | |
parent | Merge rest servlets into the client json resource object (diff) | |
download | synapse-7dfd99f16354801ed51a3a5a99b3ea6db1e670d4.tar.xz |
Merge pull request #31 from matrix-org/client_api_resource
Merge rest servlets into the client json resource object
Diffstat (limited to 'tests/rest/client')
-rw-r--r-- | tests/rest/client/v1/test_presence.py | 9 | ||||
-rw-r--r-- | tests/rest/client/v1/test_profile.py | 4 |
2 files changed, 9 insertions, 4 deletions
diff --git a/tests/rest/client/v1/test_presence.py b/tests/rest/client/v1/test_presence.py index 0b6f7cfccb..783720ac29 100644 --- a/tests/rest/client/v1/test_presence.py +++ b/tests/rest/client/v1/test_presence.py @@ -25,6 +25,8 @@ from ....utils import MockHttpResource, MockKey from synapse.api.constants import PresenceState from synapse.handlers.presence import PresenceHandler from synapse.server import HomeServer +from synapse.rest.client.v1 import presence +from synapse.rest.client.v1 import events OFFLINE = PresenceState.OFFLINE @@ -86,7 +88,7 @@ class PresenceStateTestCase(unittest.TestCase): return defer.succeed([]) room_member_handler.get_rooms_for_user = get_rooms_for_user - hs.register_servlets() + presence.register_servlets(hs, self.mock_resource) self.u_apple = hs.parse_userid(myid) @@ -172,7 +174,7 @@ class PresenceListTestCase(unittest.TestCase): hs.get_auth().get_user_by_token = _get_user_by_token - hs.register_servlets() + presence.register_servlets(hs, self.mock_resource) self.u_apple = hs.parse_userid("@apple:test") self.u_banana = hs.parse_userid("@banana:test") @@ -283,7 +285,8 @@ class PresenceEventStreamTestCase(unittest.TestCase): hs.get_auth().get_user_by_req = _get_user_by_req - hs.register_servlets() + presence.register_servlets(hs, self.mock_resource) + events.register_servlets(hs, self.mock_resource) hs.handlers.room_member_handler = Mock(spec=[]) diff --git a/tests/rest/client/v1/test_profile.py b/tests/rest/client/v1/test_profile.py index 47cfb10a6d..5b5c3edc22 100644 --- a/tests/rest/client/v1/test_profile.py +++ b/tests/rest/client/v1/test_profile.py @@ -25,6 +25,8 @@ from ....utils import MockHttpResource, MockKey from synapse.api.errors import SynapseError, AuthError from synapse.server import HomeServer +from synapse.rest.client.v1 import profile + myid = "@1234ABCD:test" PATH_PREFIX = "/_matrix/client/api/v1" @@ -61,7 +63,7 @@ class ProfileTestCase(unittest.TestCase): hs.get_handlers().profile_handler = self.mock_handler - hs.register_servlets() + profile.register_servlets(hs, self.mock_resource) @defer.inlineCallbacks def test_get_my_name(self): |