diff options
author | drebs <drebs@leap.se> | 2017-01-26 19:18:15 -0200 |
---|---|---|
committer | Kali Kaneko <kali@leap.se> | 2017-02-09 17:41:45 +0100 |
commit | 47858d88ca4ca10ac363c71550b1bafe50f8f4ce (patch) | |
tree | b5bffe1b526e55c3279498851bd1c2628d83291b /testing/tests/server | |
parent | 47c357213b4e39c6ced818de7eeb401e52bf92b9 (diff) |
[refactor] allow passing threadpool pool for server sync resource
Conflicts:
server/src/leap/soledad/server/_resource.py
testing/tests/server/test__resource.py
Diffstat (limited to 'testing/tests/server')
-rw-r--r-- | testing/tests/server/test_auth.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/testing/tests/server/test_auth.py b/testing/tests/server/test_auth.py index 8ef35177..f7fe0f25 100644 --- a/testing/tests/server/test_auth.py +++ b/testing/tests/server/test_auth.py @@ -23,6 +23,7 @@ from contextlib import contextmanager from twisted.cred.credentials import UsernamePassword from twisted.cred.error import UnauthorizedLogin +from twisted.internet import reactor from twisted.internet.defer import inlineCallbacks from twisted.trial import unittest from twisted.web.resource import IResource @@ -37,7 +38,9 @@ from leap.soledad.server._resource import SoledadResource class SoledadRealmTestCase(unittest.TestCase): def test_returned_resource(self): - realm = SoledadRealm() + # we have to pass a pool to the realm , otherwise tests will hang + pool = reactor.getThreadPool() + realm = SoledadRealm(sync_pool=pool) iface, avatar, logout = realm.requestAvatar('any', None, IResource) self.assertIsInstance(avatar, SoledadResource) self.assertIsNone(logout()) |