Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • caosdb/src/caosdb-advanced-user-tools
1 result
Show changes
Commits on Source (2)
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*")
......