mirror of
https://github.com/zulip/zulip.git
synced 2025-11-06 06:53:25 +00:00
test_presence: Upgrade to HttpResponse.json().
This commit is contained in:
@@ -134,8 +134,7 @@ class UserPresenceTests(ZulipTestCase):
|
|||||||
result = self.client_post("/json/users/me/presence", {'status': 'idle'})
|
result = self.client_post("/json/users/me/presence", {'status': 'idle'})
|
||||||
|
|
||||||
self.assert_json_success(result)
|
self.assert_json_success(result)
|
||||||
json = ujson.loads(result.content)
|
self.assertEqual(result.json()['presences'][self.example_email("hamlet")][client]['status'], 'idle')
|
||||||
self.assertEqual(json['presences'][self.example_email("hamlet")][client]['status'], 'idle')
|
|
||||||
|
|
||||||
email = self.example_email("othello")
|
email = self.example_email("othello")
|
||||||
self.login(self.example_email("othello"))
|
self.login(self.example_email("othello"))
|
||||||
@@ -157,8 +156,7 @@ class UserPresenceTests(ZulipTestCase):
|
|||||||
self.login(self.mit_email("espuser"))
|
self.login(self.mit_email("espuser"))
|
||||||
result = self.client_post("/json/users/me/presence", {'status': 'idle'})
|
result = self.client_post("/json/users/me/presence", {'status': 'idle'})
|
||||||
self.assert_json_success(result)
|
self.assert_json_success(result)
|
||||||
json = ujson.loads(result.content)
|
self.assertEqual(result.json()['presences'], {})
|
||||||
self.assertEqual(json['presences'], {})
|
|
||||||
|
|
||||||
def test_mirror_presence(self):
|
def test_mirror_presence(self):
|
||||||
# type: () -> None
|
# type: () -> None
|
||||||
|
|||||||
Reference in New Issue
Block a user