Skip to content

Commit d095424

Browse files
authored
[AL-6741] fix assert message for ADV (#1190)
2 parents cc8eed7 + 714dd4c commit d095424

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

tests/integration/test_data_rows.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -994,11 +994,16 @@ def test_create_data_row_with_attachments(dataset):
994994
assert len(attachments) == 1
995995

996996

997-
def test_create_data_row_with_media_type(dataset, image_url):
997+
def test_create_data_row_with_media_type(dataset, image_url, is_adv_enabled):
998998
with pytest.raises(labelbox.exceptions.InvalidQueryError) as exc:
999999
dr = dataset.create_data_row(
10001000
row_data={'invalid_object': 'invalid_value'}, media_type="IMAGE")
1001-
assert "Found invalid contents for media type: \'IMAGE\'" in str(exc.value)
1001+
if is_adv_enabled:
1002+
assert "Media type validation failed, expected: 'image/*', was: application/json" in str(
1003+
exc.value)
1004+
else:
1005+
assert "Found invalid contents for media type: \'IMAGE\'" in str(
1006+
exc.value)
10021007

10031008
dataset.create_data_row(row_data=image_url, media_type="IMAGE")
10041009

0 commit comments

Comments
 (0)