diff options
author | Kegan Dougal <kegan@matrix.org> | 2014-08-27 11:33:56 +0100 |
---|---|---|
committer | Kegan Dougal <kegan@matrix.org> | 2014-08-27 11:33:56 +0100 |
commit | dd661769e1846b627d26203f6ca7936e0820d93c (patch) | |
tree | 874a737fba65d5c8e515e9fa93ff7707dcff9a97 /tests/rest/utils.py | |
parent | Added support for GET /events/$eventid with auth checks. (diff) | |
download | synapse-dd661769e1846b627d26203f6ca7936e0820d93c.tar.xz |
Renamed /rooms to /createRoom. Removed ability to PUT raw room IDs, and removed tests which tested that. Updated cmdclient and webclient.
Diffstat (limited to 'tests/rest/utils.py')
-rw-r--r-- | tests/rest/utils.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/rest/utils.py b/tests/rest/utils.py index 590d12f155..ef9a6071e2 100644 --- a/tests/rest/utils.py +++ b/tests/rest/utils.py @@ -24,6 +24,7 @@ from synapse.api.constants import Membership import json import time + class RestTestCase(unittest.TestCase): """Contains extra helper functions to quickly and clearly perform a given REST action, which isn't the focus of the test. @@ -40,18 +41,19 @@ class RestTestCase(unittest.TestCase): return self.auth_user_id @defer.inlineCallbacks - def create_room_as(self, room_id, room_creator, is_public=True, tok=None): + def create_room_as(self, room_creator, is_public=True, tok=None): temp_id = self.auth_user_id self.auth_user_id = room_creator - path = "/rooms/%s" % room_id + path = "/createRoom" content = "{}" if not is_public: content = '{"visibility":"private"}' if tok: path = path + "?access_token=%s" % tok - (code, response) = yield self.mock_resource.trigger("PUT", path, content) + (code, response) = yield self.mock_resource.trigger("POST", path, content) self.assertEquals(200, code, msg=str(response)) self.auth_user_id = temp_id + defer.returnValue(response["room_id"]) @defer.inlineCallbacks def invite(self, room=None, src=None, targ=None, expect_code=200, tok=None): |