Skip to content
Snippets Groups Projects
Commit b6f88996 authored by Florian Spreckelsen's avatar Florian Spreckelsen
Browse files
parent 9e12c3ed
Branches
Tags
1 merge request!84Add test for https://gitlab.com/linkahead/linkahead-pylib/-/issues/119
Pipeline #58578 passed
......@@ -36,7 +36,7 @@ import pytest
from linkahead import administration as admin
from linkahead.exceptions import (TransactionError, HTTPClientError)
from linkahead.apiutils import empty_diff, merge_entities
from linkahead.apiutils import compare_entities, empty_diff, merge_entities
CURATOR_ROLE = "curator"
......@@ -156,9 +156,14 @@ def test_gitlab_com_119():
# Ensure rec1 has prop, rec2 does not
assert not empty_diff(rec1, rec2)
assert len(rec2.properties) == 0
diff1, diff2 = compare_entities(rec1, rec2)
assert prop.id in diff1["properties"]
assert None not in diff1["properties"]
assert len(diff2["properties"]) == 0
# Merge and check rec2 now has prop
merge_entities(rec2, rec1)
assert rec2.get_property(prop) is not None
assert empty_diff(rec1.get_property(prop), rec2.get_property(prop))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment