diff --git a/unittests/test_apiutils.py b/unittests/test_apiutils.py index 2668270f1ca6cdf45b654a2881db34d89f70bda6..5b99ebc335ed2cb1dfffcda18e6d35d06f3a559d 100644 --- a/unittests/test_apiutils.py +++ b/unittests/test_apiutils.py @@ -192,29 +192,29 @@ def test_compare_entities(): assert "entity_Ent_d" in diff_r1["properties"] assert "entity_Ent_d" in diff_r2["properties"] -# diff_r1, diff_r2 = compare_entities(r1, r2, -# entity_name_id_equivalency=True, -# compare_referenced_records=True) -# -# assert len(diff_r1["parents"]) == 1 -# assert len(diff_r2["parents"]) == 0 -# assert len(diff_r1["properties"]) == 9 -# assert len(diff_r2["properties"]) == 9 -# -# assert "entity_id" in diff_r1["properties"] -# assert "entity_id" in diff_r2["properties"] -# -# assert "entity_mix_e" not in diff_r1["properties"] -# assert "entity_mix_e" not in diff_r2["properties"] -# assert "entity_mix_w" in diff_r1["properties"] -# assert "entity_mix_w" in diff_r2["properties"] -# assert "entity_Ent_e" not in diff_r1["properties"] -# assert "entity_Ent_e" not in diff_r2["properties"] -# -# assert "entity_mix_d" in diff_r1["properties"] -# assert "entity_mix_d" in diff_r2["properties"] -# assert "entity_Ent_d" in diff_r1["properties"] -# assert "entity_Ent_d" in diff_r2["properties"] + diff_r1, diff_r2 = compare_entities(r1, r2, + entity_name_id_equivalency=True, + compare_referenced_records=True) + + assert len(diff_r1["parents"]) == 1 + assert len(diff_r2["parents"]) == 0 + assert len(diff_r1["properties"]) == 9 + assert len(diff_r2["properties"]) == 9 + + assert "entity_id" in diff_r1["properties"] + assert "entity_id" in diff_r2["properties"] + + assert "entity_mix_e" not in diff_r1["properties"] + assert "entity_mix_e" not in diff_r2["properties"] + assert "entity_mix_w" in diff_r1["properties"] + assert "entity_mix_w" in diff_r2["properties"] + assert "entity_Ent_e" not in diff_r1["properties"] + assert "entity_Ent_e" not in diff_r2["properties"] + + assert "entity_mix_d" in diff_r1["properties"] + assert "entity_mix_d" in diff_r2["properties"] + assert "entity_Ent_d" in diff_r1["properties"] + assert "entity_Ent_d" in diff_r2["properties"] r1 = db.Record() r2 = db.Record()