diff options
author | Victor Shyba <victor1984@riseup.net> | 2017-11-27 08:47:12 -0300 |
---|---|---|
committer | Victor Shyba <victor1984@riseup.net> | 2017-12-01 01:38:08 -0300 |
commit | e8cf7f5bfbf5cfe83c82e06ab1ad028642bdf44a (patch) | |
tree | d099fa29f379e409fca5b8233ece3def4082ce9e /tests/server | |
parent | 0c1ead339b612e9c13ffddf2629ebb6509d4f96a (diff) |
[feature] add a streaming resource
-- Related: #8809
Diffstat (limited to 'tests/server')
-rw-r--r-- | tests/server/test__resource.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/server/test__resource.py b/tests/server/test__resource.py index a43ac19f..f3788de1 100644 --- a/tests/server/test__resource.py +++ b/tests/server/test__resource.py @@ -28,6 +28,7 @@ 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 +from leap.soledad.server._streaming_resource import StreamingResource from leap.soledad.server.gzip_middleware import GzipMiddleware @@ -46,11 +47,17 @@ class PublicResourceTestCase(unittest.TestCase): def test_get_blobs_enabled(self): blobs_resource = BlobsResource("filesystem", '/tmp') + streaming_resource = StreamingResource("filesystem", '/tmp') resource = PublicResource( - blobs_resource=blobs_resource, sync_pool=_pool) + blobs_resource=blobs_resource, + streaming_resource=streaming_resource, + sync_pool=_pool) request = DummyRequest(['blobs']) child = getChildForRequest(resource, request) self.assertIsInstance(child, BlobsResource) + request = DummyRequest(['stream']) + child = getChildForRequest(resource, request) + self.assertIsInstance(child, StreamingResource) def test_get_blobs_disabled(self): blobs_resource = None |