From df9e5f0e9e94972e2730272ad0000cab952b68d8 Mon Sep 17 00:00:00 2001 From: Attila Papai Date: Mon, 31 Jul 2023 16:17:51 +0200 Subject: [PATCH 1/2] fix assert --- tests/integration/test_data_rows.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/integration/test_data_rows.py b/tests/integration/test_data_rows.py index 36fc8c692..195ef47ca 100644 --- a/tests/integration/test_data_rows.py +++ b/tests/integration/test_data_rows.py @@ -858,8 +858,8 @@ def test_data_row_delete_and_create_with_same_global_key( if is_adv_enabled: assert task.status == "COMPLETE" assert len(task.failed_data_rows) == 1 - assert "Duplicate global key found" in task.failed_data_rows[0][ - 'message'] + assert task.failed_data_rows[0][ + 'message'] == f"Duplicate global key: '{global_key_1}'" else: assert task.status == "FAILED" assert len(task.failed_data_rows) > 0 From 41107cc118324db6d4cb00409c07248f186716dd Mon Sep 17 00:00:00 2001 From: Attila Papai Date: Mon, 31 Jul 2023 16:28:02 +0200 Subject: [PATCH 2/2] assert if list before asserting its length --- tests/integration/test_data_rows.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/integration/test_data_rows.py b/tests/integration/test_data_rows.py index 195ef47ca..a37f909ef 100644 --- a/tests/integration/test_data_rows.py +++ b/tests/integration/test_data_rows.py @@ -798,7 +798,9 @@ def test_data_row_bulk_creation_with_same_global_keys(dataset, sample_image, task.wait_till_done() if is_adv_enabled: assert task.status == "COMPLETE" + assert type(task.failed_data_rows) is list assert len(task.failed_data_rows) == 1 + assert type(task.created_data_rows) is list assert len(task.created_data_rows) == 1 assert task.failed_data_rows[0][ 'message'] == f"Duplicate global key: '{global_key_1}'"