diff options
author | Erik Johnston <erikj@jki.re> | 2016-08-18 09:35:19 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-08-18 09:35:19 +0100 |
commit | e73dcb66da2e4cea13e9b682f100bb7f9f9e521d (patch) | |
tree | 07663ba86749c777a9fec59276dd06f2095ddba0 /tests/handlers/test_appservice.py | |
parent | Merge pull request #1023 from matrix-org/erikj/update_fix (diff) | |
parent | Make notify_interested_services faster (diff) | |
download | synapse-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.py | 13 |
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 |