summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/leap/soledad/server/_resource.py3
-rw-r--r--testing/tests/server/test__resource.py9
2 files changed, 8 insertions, 4 deletions
diff --git a/src/leap/soledad/server/_resource.py b/src/leap/soledad/server/_resource.py
index c097fad8..a9f854b6 100644
--- a/src/leap/soledad/server/_resource.py
+++ b/src/leap/soledad/server/_resource.py
@@ -86,9 +86,6 @@ class SoledadResource(Resource):
if blobs_resource:
self.putChild('blobs', blobs_resource)
- # requests to /incoming goes into IncomingResource
- self.putChild('incoming', IncomingResource())
-
# other requests are routed to legacy sync resource
self._sync_resource = get_sync_resource(sync_pool)
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)