Skip to content
Snippets Groups Projects
Commit 97627a96 authored by Alexander Schlemmer's avatar Alexander Schlemmer
Browse files

TST: simple test for cyclic references

parent 45924d52
Branches
Tags
1 merge request!109Detection of cyclic references for high level API
...@@ -641,3 +641,12 @@ def test_recursion_advanced(get_record_container): ...@@ -641,3 +641,12 @@ def test_recursion_advanced(get_record_container):
r.resolve_references(r, get_record_container) r.resolve_references(r, get_record_container)
d = r.serialize(True) d = r.serialize(True)
assert r == r.sources[0] assert r == r.sources[0]
def test_cyclic_references():
r1 = db.Record()
r2 = db.Record()
r1.add_property(name="ref_to_two", value=r2)
r2.add_property(name="ref_to_one", value=r1)
r = convert_to_python_object(r1)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment