summary refs log tree commit diff
path: root/tests/handlers/test_appservice.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2016-08-17 17:20:50 +0100
committerErik Johnston <erik@matrix.org>2016-08-17 17:20:50 +0100
commit320dfe523c9496822f597f870dfae9f8ec77d54d (patch)
treed3b92be9c7cee367246c12a821539ec22f10658f /tests/handlers/test_appservice.py
parentMerge pull request #1011 from matrix-org/dbkr/contains_display_name_override (diff)
downloadsynapse-320dfe523c9496822f597f870dfae9f8ec77d54d.tar.xz
Make notify_interested_services faster
Diffstat (limited to 'tests/handlers/test_appservice.py')
-rw-r--r--tests/handlers/test_appservice.py13
1 files changed, 10 insertions, 3 deletions
diff --git a/tests/handlers/test_appservice.py b/tests/handlers/test_appservice.py
index 3116951472..9c1e5cc67c 100644
--- a/tests/handlers/test_appservice.py
+++ b/tests/handlers/test_appservice.py
@@ -110,11 +110,11 @@ class AppServiceHandlerTestCase(unittest.TestCase):
 
         room_id = "!alpha:bet"
         servers = ["aperture"]
-        interested_service = self._mkservice(is_interested=True)
+        interested_service = self._mkservice_alias(is_interested_in_alias=True)
         services = [
-            self._mkservice(is_interested=False),
+            self._mkservice_alias(is_interested_in_alias=False),
             interested_service,
-            self._mkservice(is_interested=False)
+            self._mkservice_alias(is_interested_in_alias=False)
         ]
 
         self.mock_store.get_app_services = Mock(return_value=services)
@@ -137,3 +137,10 @@ class AppServiceHandlerTestCase(unittest.TestCase):
         service.token = "mock_service_token"
         service.url = "mock_service_url"
         return service
+
+    def _mkservice_alias(self, is_interested_in_alias):
+        service = Mock()
+        service.is_interested_in_alias = Mock(return_value=is_interested_in_alias)
+        service.token = "mock_service_token"
+        service.url = "mock_service_url"
+        return service