mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2024-10-01 08:25:44 -04:00
Final url modifications: renamed /presence_list to /presence/list to keep the top-level namespace clean. Updated tests.
This commit is contained in:
parent
dd661769e1
commit
135a1aa229
@ -68,7 +68,7 @@ class PresenceStatusRestServlet(RestServlet):
|
|||||||
|
|
||||||
|
|
||||||
class PresenceListRestServlet(RestServlet):
|
class PresenceListRestServlet(RestServlet):
|
||||||
PATTERN = client_path_pattern("/presence_list/(?P<user_id>[^/]*)")
|
PATTERN = client_path_pattern("/presence/list/(?P<user_id>[^/]*)")
|
||||||
|
|
||||||
@defer.inlineCallbacks
|
@defer.inlineCallbacks
|
||||||
def on_GET(self, request, user_id):
|
def on_GET(self, request, user_id):
|
||||||
|
@ -171,7 +171,7 @@ class PresenceListTestCase(unittest.TestCase):
|
|||||||
)
|
)
|
||||||
|
|
||||||
(code, response) = yield self.mock_resource.trigger("GET",
|
(code, response) = yield self.mock_resource.trigger("GET",
|
||||||
"/presence_list/%s" % (myid), None)
|
"/presence/list/%s" % (myid), None)
|
||||||
|
|
||||||
self.assertEquals(200, code)
|
self.assertEquals(200, code)
|
||||||
self.assertEquals(
|
self.assertEquals(
|
||||||
@ -192,7 +192,7 @@ class PresenceListTestCase(unittest.TestCase):
|
|||||||
)
|
)
|
||||||
|
|
||||||
(code, response) = yield self.mock_resource.trigger("POST",
|
(code, response) = yield self.mock_resource.trigger("POST",
|
||||||
"/presence_list/%s" % (myid),
|
"/presence/list/%s" % (myid),
|
||||||
"""{"invite": ["@banana:test"]}"""
|
"""{"invite": ["@banana:test"]}"""
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -212,7 +212,7 @@ class PresenceListTestCase(unittest.TestCase):
|
|||||||
)
|
)
|
||||||
|
|
||||||
(code, response) = yield self.mock_resource.trigger("POST",
|
(code, response) = yield self.mock_resource.trigger("POST",
|
||||||
"/presence_list/%s" % (myid),
|
"/presence/list/%s" % (myid),
|
||||||
"""{"drop": ["@banana:test"]}"""
|
"""{"drop": ["@banana:test"]}"""
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user