diff options
author | Victor Shyba <victor1984@riseup.net> | 2017-08-25 05:44:41 -0300 |
---|---|---|
committer | drebs <drebs@riseup.net> | 2017-09-05 11:08:47 -0300 |
commit | 8128fa904da14136874a015ee24e8203df13f00c (patch) | |
tree | 93bffde3952035c32e8bbfd97a340cd6e437c208 /testing/tests/server/test__resource.py | |
parent | f26c027f1db489018c724a192309b93a8d8357c0 (diff) |
[bug] remove incoming child from SoledadResource
-- Related: #8867
Diffstat (limited to 'testing/tests/server/test__resource.py')
-rw-r--r-- | testing/tests/server/test__resource.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/testing/tests/server/test__resource.py b/testing/tests/server/test__resource.py index 249b62f9..f5331e35 100644 --- a/testing/tests/server/test__resource.py +++ b/testing/tests/server/test__resource.py @@ -24,6 +24,7 @@ from twisted.web.resource import getChildForRequest from twisted.internet import reactor from leap.soledad.server._resource import SoledadResource +from leap.soledad.server._resource import LocalResource from leap.soledad.server._server_info import ServerInfo from leap.soledad.server._blobs import BlobsResource from leap.soledad.server._incoming import IncomingResource @@ -70,8 +71,14 @@ class SoledadResourceTestCase(unittest.TestCase): self.assertIsInstance(child, WSGIResource) self.assertIsInstance(child._application, GzipMiddleware) - def test_get_incoming(self): + def test_no_incoming_on_public_resource(self): resource = SoledadResource(None, sync_pool=_pool) request = DummyRequest(['incoming']) child = getChildForRequest(resource, request) + self.assertIsInstance(child, WSGIResource) + + def test_get_incoming(self): + resource = LocalResource() + request = DummyRequest(['incoming']) + child = getChildForRequest(resource, request) self.assertIsInstance(child, IncomingResource) |