@@ -75,7 +75,8 @@ def test_assign_same_global_keys_to_data_rows(client, dataset, image_url):
7575 assert len (res ['errors' ]) == 1
7676 assert res ['errors' ][0 ]['data_row_id' ] == dr_2 .uid
7777 assert res ['errors' ][0 ]['global_key' ] == gk_1
78- assert res ['errors' ][0 ]['error' ] == "Invalid global key"
78+ assert res ['errors' ][0 ][
79+ 'error' ] == "Invalid assignment. Either DataRow does not exist, or globalKey is invalid"
7980
8081
8182def test_global_key_sanitization (dataset , image_url ):
@@ -111,7 +112,8 @@ def test_long_global_key_validation(client, dataset, image_url):
111112 assert res ['results' ][0 ]['global_key' ] == gk_1
112113 assert res ['errors' ][0 ]['data_row_id' ] == dr_2 .uid
113114 assert res ['errors' ][0 ]['global_key' ] == gk_2
114- assert res ['errors' ][0 ]['error' ] == 'Invalid global key'
115+ assert res ['errors' ][0 ][
116+ 'error' ] == 'Invalid assignment. Either DataRow does not exist, or globalKey is invalid'
115117
116118
117119def test_global_key_with_whitespaces_validation (client , dataset , image_url ):
@@ -143,8 +145,11 @@ def test_global_key_with_whitespaces_validation(client, dataset, image_url):
143145 assign_errors_msgs = set ([e ['error' ] for e in res ['errors' ]])
144146 assert assign_errors_ids == set ([dr_1 .uid , dr_2 .uid , dr_3 .uid ])
145147 assert assign_errors_gks == set ([gk_1 , gk_2 , gk_3 ])
146- assert assign_errors_msgs == set (
147- ['Invalid global key' , 'Invalid global key' , 'Invalid global key' ])
148+ assert assign_errors_msgs == set ([
149+ 'Invalid assignment. Either DataRow does not exist, or globalKey is invalid' ,
150+ 'Invalid assignment. Either DataRow does not exist, or globalKey is invalid' ,
151+ 'Invalid assignment. Either DataRow does not exist, or globalKey is invalid'
152+ ])
148153
149154
150155@pytest .mark .skip (reason = 'get_data_rows_for_global_keys not included in '
0 commit comments