summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
authorPaul "LeoNerd" Evans <paul@matrix.org>2014-08-18 16:43:18 +0100
committerPaul "LeoNerd" Evans <paul@matrix.org>2014-08-19 11:16:23 +0100
commit83f031207e3ff1ceaacccaf83df76ea67aeefb1b (patch)
tree194d77f34310c06d80e0fccd482d37fa80cc4973 /tests
parentDeny __iter__ on UserID/RoomID/RoomName instances as it's a subtle bug that w... (diff)
downloadsynapse-83f031207e3ff1ceaacccaf83df76ea67aeefb1b.tar.xz
Implement and test presence dropping of remote users
Diffstat (limited to 'tests')
-rw-r--r--tests/handlers/test_presence.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/handlers/test_presence.py b/tests/handlers/test_presence.py
index 86bd8bb3f2..a1856e46e2 100644
--- a/tests/handlers/test_presence.py
+++ b/tests/handlers/test_presence.py
@@ -384,6 +384,14 @@ class PresenceInvitesTestCase(unittest.TestCase):
                 self.u_apple, target_user=self.u_banana)
 
     @defer.inlineCallbacks
+    def test_drop_remote(self):
+        yield self.handler.drop(
+                observer_user=self.u_apple, observed_user=self.u_cabbage)
+
+        self.datastore.del_presence_list.assert_called_with(
+                "apple", "@cabbage:elsewhere")
+
+    @defer.inlineCallbacks
     def test_get_presence_list(self):
         self.datastore.get_presence_list.return_value = defer.succeed(
                 [{"observed_user_id": "@banana:test"}]