From 7db6120c7ffd6389ebce4745134d63a8eedeffb6 Mon Sep 17 00:00:00 2001
From: Daniel <d.hornung@indiscale.com>
Date: Wed, 25 Oct 2023 10:26:48 +0200
Subject: [PATCH] TEST: Appended to test.

---
 tests/test_issues_pylib.py | 15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)

diff --git a/tests/test_issues_pylib.py b/tests/test_issues_pylib.py
index fdf76c9..e389fe2 100644
--- a/tests/test_issues_pylib.py
+++ b/tests/test_issues_pylib.py
@@ -69,13 +69,22 @@ def teardown_function(function):
 
 @pytest.mark.xfail(reason="Entities with many, long, properties: "
                    "https://gitlab.com/linkahead/linkahead-pylib/-/issues/108")
-def test_gitlab_com_108(self):
-    # create RT and one property
+def test_gitlab_com_108():
+    """Create RT and a list of properties, then insert and retrieve.
+
+    This is another instance of bugs caused by caosdb/src/caosdb-mysqlbackend#48
+    """
     cont = db.Container()
     long = "Long" * 50
-    first_RT = db.RecordType(name=f"TestRecord_first")
+    first_RT = db.RecordType(name="TestRecord_first")
     for index in range(20):
         this_RT = db.RecordType(name=f"TestRecord_{long}_{index:02d}")
         first_RT.add_property(this_RT)
+        cont.append(this_RT)
     cont.append(first_RT)
+    cont.insert()
     cont.retrieve()
+
+    # Incidentally, the following lines seem to trigger another, unrelated problem
+    tests = db.execute_query("FIND ENTITY test*", cache=False)
+    tests.delete()
-- 
GitLab