diff options
Diffstat (limited to 'testing')
-rw-r--r-- | testing/tests/server/test_blobs_server.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/testing/tests/server/test_blobs_server.py b/testing/tests/server/test_blobs_server.py index dde25668..152215d1 100644 --- a/testing/tests/server/test_blobs_server.py +++ b/testing/tests/server/test_blobs_server.py @@ -31,6 +31,7 @@ from leap.soledad.server import _blobs as server_blobs from leap.soledad.client._db.blobs import BlobManager from leap.soledad.client._db.blobs import BlobAlreadyExistsError from leap.soledad.client._db.blobs import InvalidFlagsError +from leap.soledad.client._db.blobs import SoledadError class BlobServerTestCase(unittest.TestCase): @@ -70,6 +71,14 @@ class BlobServerTestCase(unittest.TestCase): @defer.inlineCallbacks @pytest.mark.usefixtures("method_tmpdir") + def test_set_flags_raises_if_no_blob_found(self): + manager = BlobManager('', self.uri, self.secret, + self.secret, 'user') + with pytest.raises(SoledadError): + yield manager.set_flags('missing_id', [Flags.PENDING]) + + @defer.inlineCallbacks + @pytest.mark.usefixtures("method_tmpdir") def test_list_filter_flag(self): manager = BlobManager('', self.uri, self.secret, self.secret, 'user') |