From a68883c47f385c23488b9dce0b43a37ad17eb7c5 Mon Sep 17 00:00:00 2001
From: Alexander Schlemmer <alexander@mail-schlemmer.de>
Date: Tue, 12 Apr 2022 15:24:08 +0200
Subject: [PATCH] TST: adapted test to use member function instead of
 copy_entity

---
 unittests/test_apiutils.py | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/unittests/test_apiutils.py b/unittests/test_apiutils.py
index daa1e1c3..e75f6049 100644
--- a/unittests/test_apiutils.py
+++ b/unittests/test_apiutils.py
@@ -31,7 +31,7 @@ import tempfile
 import caosdb as db
 import caosdb.apiutils
 from caosdb.apiutils import (apply_to_ids, compare_entities, create_id_query,
-                             resolve_reference, copy_entity, merge_entities)
+                             resolve_reference, merge_entities)
 
 from .test_property import testrecord
 
@@ -241,10 +241,11 @@ def test_copy_entities():
     r.add_property(name="D", value=[3, 4, 7], importance="OBLIGATORY")
     r.description = "A fancy test record"
 
-    c = copy_entity(r)
+    c = r.copy()
 
-    assert c != r
+    assert c is not r
     assert c.name == "A"
+    assert c.role == r.role
     assert c.parents[0].name == "B"
     # Currently parents and properties are always individual to a copy:
     assert c.parents[0] != r.parents[0]
-- 
GitLab