summary refs log tree commit diff
path: root/tests/handlers/test_appservice.py
diff options
context:
space:
mode:
authorErik Johnston <erikj@jki.re>2016-08-18 09:35:19 +0100
committerGitHub <noreply@github.com>2016-08-18 09:35:19 +0100
commite73dcb66da2e4cea13e9b682f100bb7f9f9e521d (patch)
tree07663ba86749c777a9fec59276dd06f2095ddba0 /tests/handlers/test_appservice.py
parentMerge pull request #1023 from matrix-org/erikj/update_fix (diff)
parentMake notify_interested_services faster (diff)
downloadsynapse-e73dcb66da2e4cea13e9b682f100bb7f9f9e521d.tar.xz
Merge pull request #1022 from matrix-org/erikj/as_notify_perf
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