diff options
author | Paul "LeoNerd" Evans <paul@matrix.org> | 2014-09-01 14:45:35 +0100 |
---|---|---|
committer | Paul "LeoNerd" Evans <paul@matrix.org> | 2014-09-01 14:45:41 +0100 |
commit | 02f4e3b3ff613a6e9024c0fef416be0bf92bf48f (patch) | |
tree | d3f165d0a69df79b10851a82d87f2615b183f196 /tests/handlers/test_presencelike.py | |
parent | Fleshed out joining/leaving rooms. Added M_LIMIT_EXCEEDED standard error code... (diff) | |
download | synapse-02f4e3b3ff613a6e9024c0fef416be0bf92bf48f.tar.xz |
Rename 'state' presence key to the much more obvious 'presence'; maintain a legacy 'state' copy for now
Diffstat (limited to 'tests/handlers/test_presencelike.py')
-rw-r--r-- | tests/handlers/test_presencelike.py | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/tests/handlers/test_presencelike.py b/tests/handlers/test_presencelike.py index e81d7ce101..2402bed8d5 100644 --- a/tests/handlers/test_presencelike.py +++ b/tests/handlers/test_presencelike.py @@ -182,11 +182,13 @@ class PresenceProfilelikeDataTestCase(unittest.TestCase): self.assertEquals([ {"observed_user": self.u_banana, + "presence": ONLINE, "state": ONLINE, "mtime_age": 0, "displayname": "Frank", "avatar_url": "http://foo"}, {"observed_user": self.u_clementine, + "presence": OFFLINE, "state": OFFLINE}], presence) @@ -199,7 +201,7 @@ class PresenceProfilelikeDataTestCase(unittest.TestCase): statuscache = self.mock_update_client.call_args[1]["statuscache"] self.assertEquals({ - "state": ONLINE, + "presence": ONLINE, "mtime": 1000000, # MockClock "displayname": "Frank", "avatar_url": "http://foo", @@ -222,7 +224,7 @@ class PresenceProfilelikeDataTestCase(unittest.TestCase): statuscache = self.mock_update_client.call_args[1]["statuscache"] self.assertEquals({ - "state": ONLINE, + "presence": ONLINE, "mtime": 1000000, # MockClock "displayname": "I am an Apple", "avatar_url": "http://foo", @@ -255,6 +257,7 @@ class PresenceProfilelikeDataTestCase(unittest.TestCase): content={ "push": [ {"user_id": "@apple:test", + "presence": "online", "state": "online", "mtime_age": 0, "displayname": "Frank", @@ -293,14 +296,16 @@ class PresenceProfilelikeDataTestCase(unittest.TestCase): statuscache=ANY) statuscache = self.mock_update_client.call_args[1]["statuscache"] - self.assertEquals({"state": ONLINE, + self.assertEquals({"presence": ONLINE, "displayname": "Frank", "avatar_url": "http://foo"}, statuscache.state) state = yield self.handlers.presence_handler.get_state(self.u_potato, self.u_apple) - self.assertEquals({"state": ONLINE, - "displayname": "Frank", - "avatar_url": "http://foo"}, - state) + self.assertEquals( + {"presence": ONLINE, + "state": ONLINE, + "displayname": "Frank", + "avatar_url": "http://foo"}, + state) |