diff options
author | drebs <drebs@riseup.net> | 2017-09-29 18:38:48 -0300 |
---|---|---|
committer | drebs <drebs@riseup.net> | 2017-09-29 19:20:40 -0300 |
commit | 7555e20158df4fa4a724be26eeb5d68ed2ef4508 (patch) | |
tree | 603709ec9fd6ecb19f16f71e5080b6001784d4b4 /tests/server | |
parent | 6212a53f6cc7cea01eb514afa696448d125b276f (diff) |
[bug] check all http response status codes
Diffstat (limited to 'tests/server')
-rw-r--r-- | tests/server/test_blobs_server.py | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/server/test_blobs_server.py b/tests/server/test_blobs_server.py index 2ee6fda2..c628ae78 100644 --- a/tests/server/test_blobs_server.py +++ b/tests/server/test_blobs_server.py @@ -292,3 +292,21 @@ class BlobServerTestCase(unittest.TestCase): yield manager._delete_from_remote('blob_id1', namespace=namespace) blobs_list = yield manager.remote_list(namespace=namespace) self.assertEquals(set(['blob_id2']), set(blobs_list)) + + @defer.inlineCallbacks + @pytest.mark.usefixtures("method_tmpdir") + def test_get_fails_if_no_blob_found(self): + manager = BlobManager(self.tempdir, self.uri, self.secret, + self.secret, uuid4().hex) + self.addCleanup(manager.close) + with pytest.raises(SoledadError): + yield manager.get('missing_id') + + @defer.inlineCallbacks + @pytest.mark.usefixtures("method_tmpdir") + def test_delete_fails_if_no_blob_found(self): + manager = BlobManager(self.tempdir, self.uri, self.secret, + self.secret, uuid4().hex) + self.addCleanup(manager.close) + with pytest.raises(SoledadError): + yield manager.delete('missing_id') |