Test clean up, uses wrong method to clean entities
Closed this issue · 1 comments
RedingJeff commented
Describe the bug
Certain tests leave artifacts in the Fiware contextbroker after their clean up.
The clean uses the .update(action_type="delete") function which only deletes the attributes of the entity if it has some, leaving an entity entry with id an type in the broker.
Solution
Replace in clean up function:
client.update(entities=entities, action_type='delete')
with
for entity in entities: client.delete_entity(entity_id=entity.id, entity_type=entity.type)
github-actions commented
Branch 69-Test-clean-up-uses-wrong-method-to-clean-entities created!