diff options
author | Mark Haines <mark.haines@matrix.org> | 2015-01-22 14:59:08 +0000 |
---|---|---|
committer | Mark Haines <mark.haines@matrix.org> | 2015-01-22 14:59:08 +0000 |
commit | 1d2016b4a881538aa86f4824f1131dfada186ae0 (patch) | |
tree | 238cbc5b79065e485c08d9eec11e72e491b9ce98 /tests | |
parent | Fix manifest. Ignore contrib and docs directories when checking manifest agai... (diff) | |
download | synapse-1d2016b4a881538aa86f4824f1131dfada186ae0.tar.xz |
Move client v1 api rest servlets into a "client/v1" directory
Diffstat (limited to '')
-rw-r--r-- | tests/client/__init__.py | 14 | ||||
-rw-r--r-- | tests/client/v1/__init__.py (renamed from tests/rest/__init__.py) | 0 | ||||
-rw-r--r-- | tests/client/v1/test_events.py (renamed from tests/rest/test_events.py) | 14 | ||||
-rw-r--r-- | tests/client/v1/test_presence.py (renamed from tests/rest/test_presence.py) | 2 | ||||
-rw-r--r-- | tests/client/v1/test_profile.py (renamed from tests/rest/test_profile.py) | 2 | ||||
-rw-r--r-- | tests/client/v1/test_rooms.py (renamed from tests/rest/test_rooms.py) | 18 | ||||
-rw-r--r-- | tests/client/v1/test_typing.py (renamed from tests/rest/test_typing.py) | 6 | ||||
-rw-r--r-- | tests/client/v1/utils.py (renamed from tests/rest/utils.py) | 0 |
8 files changed, 35 insertions, 21 deletions
diff --git a/tests/client/__init__.py b/tests/client/__init__.py new file mode 100644 index 0000000000..1a84d94cd9 --- /dev/null +++ b/tests/client/__init__.py @@ -0,0 +1,14 @@ +# -*- coding: utf-8 -*- +# Copyright 2015 OpenMarket Ltd +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. diff --git a/tests/rest/__init__.py b/tests/client/v1/__init__.py index 9bff9ec169..9bff9ec169 100644 --- a/tests/rest/__init__.py +++ b/tests/client/v1/__init__.py diff --git a/tests/rest/test_events.py b/tests/client/v1/test_events.py index d3159e2cf4..9b36dd3225 100644 --- a/tests/rest/test_events.py +++ b/tests/client/v1/test_events.py @@ -19,13 +19,13 @@ from tests import unittest # twisted imports from twisted.internet import defer -import synapse.rest.events -import synapse.rest.register -import synapse.rest.room +import synapse.client.v1.events +import synapse.client.v1.register +import synapse.client.v1.room from synapse.server import HomeServer -from ..utils import MockHttpResource, SQLiteMemoryDbPool, MockKey +from ...utils import MockHttpResource, SQLiteMemoryDbPool, MockKey from .utils import RestTestCase from mock import Mock, NonCallableMock @@ -144,9 +144,9 @@ class EventStreamPermissionsTestCase(RestTestCase): hs.get_clock().time_msec.return_value = 1000000 hs.get_clock().time.return_value = 1000 - synapse.rest.register.register_servlets(hs, self.mock_resource) - synapse.rest.events.register_servlets(hs, self.mock_resource) - synapse.rest.room.register_servlets(hs, self.mock_resource) + synapse.client.v1.register.register_servlets(hs, self.mock_resource) + synapse.client.v1.events.register_servlets(hs, self.mock_resource) + synapse.client.v1.room.register_servlets(hs, self.mock_resource) # register an account self.user_id = "sid1" diff --git a/tests/rest/test_presence.py b/tests/client/v1/test_presence.py index 769c7824bc..e7d636c74d 100644 --- a/tests/rest/test_presence.py +++ b/tests/client/v1/test_presence.py @@ -20,7 +20,7 @@ from twisted.internet import defer from mock import Mock -from ..utils import MockHttpResource, MockKey +from ...utils import MockHttpResource, MockKey from synapse.api.constants import PresenceState from synapse.handlers.presence import PresenceHandler diff --git a/tests/rest/test_profile.py b/tests/client/v1/test_profile.py index 3a0d1e700a..1182cc54eb 100644 --- a/tests/rest/test_profile.py +++ b/tests/client/v1/test_profile.py @@ -20,7 +20,7 @@ from twisted.internet import defer from mock import Mock, NonCallableMock -from ..utils import MockHttpResource, MockKey +from ...utils import MockHttpResource, MockKey from synapse.api.errors import SynapseError, AuthError from synapse.server import HomeServer diff --git a/tests/rest/test_rooms.py b/tests/client/v1/test_rooms.py index 8e65ff9a1c..33a8631d76 100644 --- a/tests/rest/test_rooms.py +++ b/tests/client/v1/test_rooms.py @@ -18,7 +18,7 @@ # twisted imports from twisted.internet import defer -import synapse.rest.room +import synapse.client.v1.room from synapse.api.constants import Membership from synapse.server import HomeServer @@ -30,7 +30,7 @@ import json import urllib import types -from ..utils import MockHttpResource, SQLiteMemoryDbPool, MockKey +from ...utils import MockHttpResource, SQLiteMemoryDbPool, MockKey from .utils import RestTestCase from mock import Mock, NonCallableMock @@ -82,7 +82,7 @@ class RoomPermissionsTestCase(RestTestCase): self.auth_user_id = self.rmcreator_id - synapse.rest.room.register_servlets(hs, self.mock_resource) + synapse.client.v1.room.register_servlets(hs, self.mock_resource) self.auth = hs.get_auth() @@ -476,7 +476,7 @@ class RoomsMemberListTestCase(RestTestCase): return defer.succeed(None) hs.get_datastore().insert_client_ip = _insert_client_ip - synapse.rest.room.register_servlets(hs, self.mock_resource) + synapse.client.v1.room.register_servlets(hs, self.mock_resource) def tearDown(self): pass @@ -565,7 +565,7 @@ class RoomsCreateTestCase(RestTestCase): return defer.succeed(None) hs.get_datastore().insert_client_ip = _insert_client_ip - synapse.rest.room.register_servlets(hs, self.mock_resource) + synapse.client.v1.room.register_servlets(hs, self.mock_resource) def tearDown(self): pass @@ -668,7 +668,7 @@ class RoomTopicTestCase(RestTestCase): return defer.succeed(None) hs.get_datastore().insert_client_ip = _insert_client_ip - synapse.rest.room.register_servlets(hs, self.mock_resource) + synapse.client.v1.room.register_servlets(hs, self.mock_resource) # create the room self.room_id = yield self.create_room_as(self.user_id) @@ -783,7 +783,7 @@ class RoomMemberStateTestCase(RestTestCase): return defer.succeed(None) hs.get_datastore().insert_client_ip = _insert_client_ip - synapse.rest.room.register_servlets(hs, self.mock_resource) + synapse.client.v1.room.register_servlets(hs, self.mock_resource) self.room_id = yield self.create_room_as(self.user_id) @@ -919,7 +919,7 @@ class RoomMessagesTestCase(RestTestCase): return defer.succeed(None) hs.get_datastore().insert_client_ip = _insert_client_ip - synapse.rest.room.register_servlets(hs, self.mock_resource) + synapse.client.v1.room.register_servlets(hs, self.mock_resource) self.room_id = yield self.create_room_as(self.user_id) @@ -1023,7 +1023,7 @@ class RoomInitialSyncTestCase(RestTestCase): return defer.succeed(None) hs.get_datastore().insert_client_ip = _insert_client_ip - synapse.rest.room.register_servlets(hs, self.mock_resource) + synapse.client.v1.room.register_servlets(hs, self.mock_resource) # Since I'm getting my own presence I need to exist as far as presence # is concerned. diff --git a/tests/rest/test_typing.py b/tests/client/v1/test_typing.py index 18138af1b5..d6d677bde3 100644 --- a/tests/rest/test_typing.py +++ b/tests/client/v1/test_typing.py @@ -18,10 +18,10 @@ # twisted imports from twisted.internet import defer -import synapse.rest.room +import synapse.client.v1.room from synapse.server import HomeServer -from ..utils import MockHttpResource, MockClock, SQLiteMemoryDbPool, MockKey +from ...utils import MockHttpResource, MockClock, SQLiteMemoryDbPool, MockKey from .utils import RestTestCase from mock import Mock, NonCallableMock @@ -104,7 +104,7 @@ class RoomTypingTestCase(RestTestCase): hs.get_handlers().room_member_handler.fetch_room_distributions_into = ( fetch_room_distributions_into) - synapse.rest.room.register_servlets(hs, self.mock_resource) + synapse.client.v1.room.register_servlets(hs, self.mock_resource) self.room_id = yield self.create_room_as(self.user_id) # Need another user to make notifications actually work diff --git a/tests/rest/utils.py b/tests/client/v1/utils.py index 579441fb4a..579441fb4a 100644 --- a/tests/rest/utils.py +++ b/tests/client/v1/utils.py |