Skip to content

Commit 9ec8d62

Browse files
author
Val Brodsky
committed
Test for model run upload with a global key
1 parent 94503bb commit 9ec8d62

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

tests/integration/annotation_import/test_mea_prediction_import.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,25 @@ def test_create_from_objects(model_run_with_data_rows, object_predictions,
3737
annotation_import.wait_until_done()
3838

3939

40+
def test_create_from_objects_global_key(client, model_run_with_data_rows,
41+
entity_inference,
42+
annotation_import_test_helpers):
43+
name = str(uuid.uuid4())
44+
dr = client.get_data_row(entity_inference['dataRow']['id'])
45+
del entity_inference['dataRow']['id']
46+
entity_inference['dataRow']['globalKey'] = dr.global_key
47+
object_predictions = [entity_inference]
48+
49+
annotation_import = model_run_with_data_rows.add_predictions(
50+
name=name, predictions=object_predictions)
51+
52+
assert annotation_import.model_run_id == model_run_with_data_rows.uid
53+
annotation_import_test_helpers.check_running_state(annotation_import, name)
54+
annotation_import_test_helpers.assert_file_content(
55+
annotation_import.input_file_url, object_predictions)
56+
annotation_import.wait_until_done()
57+
58+
4059
def test_create_from_objects_with_confidence(predictions_with_confidence,
4160
model_run_with_data_rows,
4261
annotation_import_test_helpers):

0 commit comments

Comments
 (0)