From c8c555b2a37ca6b4f4502b13541870798ebd4987 Mon Sep 17 00:00:00 2001
From: Daniel <d.hornung@indiscale.com>
Date: Tue, 24 Oct 2023 14:08:33 +0200
Subject: [PATCH] TEST: Integration test for issue #55

---
 integrationtests/test_data_model.py | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/integrationtests/test_data_model.py b/integrationtests/test_data_model.py
index 5bf168cd..fce18f1b 100644
--- a/integrationtests/test_data_model.py
+++ b/integrationtests/test_data_model.py
@@ -1,4 +1,5 @@
 import unittest
+import pytest
 
 import caosdb as db
 from caosadvancedtools.models.data_model import DataModel
@@ -55,6 +56,21 @@ class DataModelTest(unittest.TestCase):
         assert len(exist) == 1
         assert exist[0].name == "TestRecord"
 
+    @pytest.mark.xfail(reason="Entities with many, long, properties: "
+                       "https://gitlab.com/linkahead/linkahead-advanced-user-tools/-/issues/55")
+    def test_large_data_model(self):
+        # create RT and one property
+        dm = DataModel()
+        long = "Long" * 50
+        first_RT = db.RecordType(name=f"TestRecord_first")
+        for index in range(20):
+            this_RT = db.RecordType(name=f"TestRecord_{long}_{index:02d}")
+            first_RT.add_property(this_RT)
+            dm.append(this_RT)
+        dm.append(first_RT)
+        dm.sync_data_model(noquestion=True)  # Insert
+        dm.sync_data_model(noquestion=True)  # Check again
+
     def tearDown(self):
         try:
             tests = db.execute_query("FIND ENTITY test*")
-- 
GitLab