diff options
author | Kegsay <kegsay@gmail.com> | 2015-03-26 10:30:47 +0000 |
---|---|---|
committer | Kegsay <kegsay@gmail.com> | 2015-03-26 10:30:47 +0000 |
commit | 5b999e206e0dd29bfe3ef0dd647d3a367e83d953 (patch) | |
tree | 7e842d9ff6d7581a63425ee076ec5d5240c12701 /tests/handlers/test_appservice.py | |
parent | Allow a choice of LRU behaviour for Cache() by using LruCache() or OrderedDict() (diff) | |
parent | Fixes from PR comments (diff) | |
download | synapse-5b999e206e0dd29bfe3ef0dd647d3a367e83d953.tar.xz |
Merge pull request #106 from matrix-org/application-services-txn-reliability
Application services transaction reliability (PR #106)
Diffstat (limited to 'tests/handlers/test_appservice.py')
-rw-r--r-- | tests/handlers/test_appservice.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/handlers/test_appservice.py b/tests/handlers/test_appservice.py index a2c541317c..06cb1dd4cf 100644 --- a/tests/handlers/test_appservice.py +++ b/tests/handlers/test_appservice.py @@ -27,10 +27,11 @@ class AppServiceHandlerTestCase(unittest.TestCase): def setUp(self): self.mock_store = Mock() self.mock_as_api = Mock() + self.mock_scheduler = Mock() hs = Mock() hs.get_datastore = Mock(return_value=self.mock_store) self.handler = ApplicationServicesHandler( - hs, self.mock_as_api + hs, self.mock_as_api, self.mock_scheduler ) @defer.inlineCallbacks @@ -52,7 +53,9 @@ class AppServiceHandlerTestCase(unittest.TestCase): ) self.mock_as_api.push = Mock() yield self.handler.notify_interested_services(event) - self.mock_as_api.push.assert_called_once_with(interested_service, event) + self.mock_scheduler.submit_event_for_as.assert_called_once_with( + interested_service, event + ) @defer.inlineCallbacks def test_query_room_alias_exists(self): |