Skip to content

Commit

Permalink
added more patch
Browse files Browse the repository at this point in the history
  • Loading branch information
shivam6862 committed Apr 24, 2024
1 parent 3bf5584 commit 1738e47
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/test_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ def raise_for_status(self):
"giza_actions.model.GizaModel._parse_cairo_response",
return_value=np.array([[1, 2], [3, 4]], dtype=np.uint32),
)
@patch(
"giza_actions.model.VersionsClient.download_original", return_value=b"some bytes"
)
def test_predict_success(*args):
model = GizaModel(id=50, version=2)

Expand Down Expand Up @@ -86,6 +89,9 @@ def test_predict_success(*args):
"giza_actions.model.GizaModel._parse_cairo_response",
return_value=np.array([[1, 2], [3, 4]], dtype=np.uint32),
)
@patch(
"giza_actions.model.VersionsClient.download_original", return_value=b"some bytes"
)
def test_predict_success_with_file(*args):
model = GizaModel(id=50, version=2)

Expand Down Expand Up @@ -121,6 +127,9 @@ def test_predict_success_with_file(*args):
@patch("giza_actions.model.GizaModel._get_output_dtype")
@patch("giza_actions.model.GizaModel._retrieve_uri")
@patch("giza_actions.model.GizaModel._get_endpoint_id", return_value=1)
@patch(
"giza_actions.model.VersionsClient.download_original", return_value=b"some bytes"
)
def test_cache_implementation(*args):
model = GizaModel(id=50, version=2)

Expand Down

0 comments on commit 1738e47

Please sign in to comment.