Skip to content

Commit f12e47f

Browse files
committed
Fix tests
1 parent a085d83 commit f12e47f

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

tests/integration/annotation_import/test_upsert_prediction_import.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,21 @@
1010
"""
1111

1212

13-
def test_create_from_url(model_run_with_model_run_data_rows,
13+
def test_create_from_url(client, tmp_path, object_predictions,
14+
model_run_with_model_run_data_rows,
1415
configured_project_without_data_rows,
1516
annotation_import_test_helpers):
1617
name = str(uuid.uuid4())
17-
url = "https://storage.googleapis.com/labelbox-public-bucket/predictions_test_v2.ndjson"
18+
file_name = f"{name}.ndjson"
19+
file_path = tmp_path / file_name
20+
with file_path.open("w") as f:
21+
ndjson.dump(object_predictions, f)
22+
23+
with open(file_path, "rb") as f:
24+
url = client.upload_data(content=f.read(),
25+
filename=file_name,
26+
sign=True,
27+
content_type="application/json")
1828

1929
annotation_import, batch, mal_prediction_import = model_run_with_model_run_data_rows.upsert_predictions_and_send_to_project(
2030
name=name,

0 commit comments

Comments
 (0)