Skip to content

Commit 714dd4c

Browse files
committed
fix assert message
1 parent 7ab6b53 commit 714dd4c

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

tests/integration/test_data_rows.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -994,12 +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 "Media type validation failed, expected: 'image/*', was: application/json" in str(
1002-
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)
10031007

10041008
dataset.create_data_row(row_data=image_url, media_type="IMAGE")
10051009

0 commit comments

Comments
 (0)