Skip to content

Commit

Permalink
Fix Core-255 Python Client CI (#12480)
Browse files Browse the repository at this point in the history
GitOrigin-RevId: d056d3e0baf8f20a60c8bbc985f01fdaf9c4c019
  • Loading branch information
jjmckee authored and Descartes Labs Build committed Mar 11, 2024
1 parent 5bfca07 commit 7fa2bb9
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions descarteslabs/core/catalog/tests/test_blob.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@
from ...common.property_filtering import Properties


def _namespace_id(namespace_id, client=None):
return "descarteslabs:test-namespace"


def _blob_do_download(_, dest=None, range=None):
mock_data = b"This is mock download data. It can be any binary data."

Expand Down Expand Up @@ -804,6 +808,7 @@ def test_download(self):
with pytest.raises(ValueError):
b.download("wrong")

@patch.object(Blob, "namespace_id", _namespace_id)
def test_invalid_upload_data(self):
b = Blob(
name="test-blob",
Expand All @@ -826,6 +831,7 @@ def test_invalid_upload_data(self):
with pytest.raises(DeletedObjectError):
b.upload_data(data="")

@patch.object(Blob, "namespace_id", _namespace_id)
def test_invalid_upload(self):
b = Blob(
name="test-blob",
Expand Down

0 comments on commit 7fa2bb9

Please sign in to comment.