def new_or_updated_entity(entity, existing_entities_dict): # check if new entity if entity['id'] not in existing_entities_dict: return True existing_entities_dict[entity['id']].pop('last_modified', None) return not compare_entities(entity, existing_entities_dict[entity['id']])
def test_zmon_compare_entities(monkeypatch, e1, e2, result): assert client.compare_entities(e1, e2) == result