Skip to content

Commit 737ccbd

Browse files
committed
fix test_list_entities - use retrieve instead of get
1 parent ddf260f commit 737ccbd

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

test/resources/Entity_test.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,9 +276,13 @@ def test_list_entities():
276276
entities_list_response = method.entities.list({'from_date': from_date})
277277
entities_list_response = [entity['id'] for entity in entities_list_response]
278278

279+
# The entity might not appear immediately due to indexing delays
280+
# Check if it's in the list, or verify we can retrieve it directly
279281
if entities_create_response['id'] not in entities_list_response:
280-
retrieved_entity = method.entities.get(entities_create_response['id'])
282+
# Verify the entity exists by retrieving it directly
283+
retrieved_entity = method.entities.retrieve(entities_create_response['id'])
281284
assert retrieved_entity['id'] == entities_create_response['id']
285+
# Entity exists but not in list yet - this is acceptable due to eventual consistency
282286
else:
283287
assert entities_create_response['id'] in entities_list_response
284288

0 commit comments

Comments
 (0)