diff --git a/tests/test_issues_pylib.py b/tests/test_issues_pylib.py index a816f14447048afa6e3bd3642a931838c3ada371..49203bc2439e53616f5cd9c3867f54e5d2159d4e 100644 --- a/tests/test_issues_pylib.py +++ b/tests/test_issues_pylib.py @@ -78,7 +78,8 @@ def test_gitlab_com_89(): https://gitlab.indiscale.com/caosdb/customers/f-fit/management/-/issues/81 """ # We need a container generated with data from the server - db.RecordType(name="TestType").insert() + rt = db.RecordType(name="TestType") + rt.insert() container = db.execute_query("FIND RECORDTYPE *") # With this container, to_xml, xml2str, and from_xml should not generate @@ -86,7 +87,9 @@ def test_gitlab_com_89(): with warnings.catch_warnings(): warnings.simplefilter("error") xml_str = linkahead.common.utils.xml2str(container.to_xml()) - db.Container.from_xml(xml_str) + cont_from_xml = db.Container.from_xml(xml_str) + assert len(cont_from_xml) == len(container) + assert cont_from_xml[0].name == rt.name # @pytest.mark.xfail(reason="Entities with many, long, properties: "