diff options
author | Amber Brown <hawkowl@atleastfornow.net> | 2018-08-31 00:19:58 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-31 00:19:58 +1000 |
commit | 14e4d4f4bf894f4e70118e03f4f4575e1eb6dab6 (patch) | |
tree | 1c7ba21ab2ebe5dbf4c7c15b0b89376fda865c31 /tests/unittest.py | |
parent | Merge pull request #3764 from matrix-org/rav/close_db_conn_after_init (diff) | |
download | synapse-14e4d4f4bf894f4e70118e03f4f4575e1eb6dab6.tar.xz |
Port storage/ to Python 3 (#3725)
Diffstat (limited to 'tests/unittest.py')
-rw-r--r-- | tests/unittest.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/unittest.py b/tests/unittest.py index d852e2465a..8b513bb32b 100644 --- a/tests/unittest.py +++ b/tests/unittest.py @@ -151,6 +151,7 @@ class HomeserverTestCase(TestCase): hijack_auth (bool): Whether to hijack auth to return the user specified in user_id. """ + servlets = [] hijack_auth = True @@ -279,3 +280,13 @@ class HomeserverTestCase(TestCase): kwargs = dict(kwargs) kwargs.update(self._hs_args) return setup_test_homeserver(self.addCleanup, *args, **kwargs) + + def pump(self): + """ + Pump the reactor enough that Deferreds will fire. + """ + self.reactor.pump([0.0] * 100) + + def get_success(self, d): + self.pump() + return self.successResultOf(d) |