From dd661769e1846b627d26203f6ca7936e0820d93c Mon Sep 17 00:00:00 2001 From: Kegan Dougal Date: Wed, 27 Aug 2014 11:33:56 +0100 Subject: Renamed /rooms to /createRoom. Removed ability to PUT raw room IDs, and removed tests which tested that. Updated cmdclient and webclient. --- tests/rest/utils.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'tests/rest/utils.py') 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): -- cgit 1.4.1