Skip to content
Snippets Groups Projects
Commit 22a8ea90 authored by Florian Spreckelsen's avatar Florian Spreckelsen
Browse files

Merge branch 'f-simple-schema-export' into f-schema-export-references

parents 3d93f7a0 10f293f5
No related branches found
No related tags found
2 merge requests!89ENH: JsonSchemaExporter accepts do_not_create parameter.,!81F schema export references
Pipeline #42802 failed
This commit is part of merge request !81. Comments created here will be created in the context of that merge request.
import unittest import unittest
import pytest
import caosdb as db import caosdb as db
from caosadvancedtools.models.data_model import DataModel from caosadvancedtools.models.data_model import DataModel
...@@ -55,6 +56,21 @@ class DataModelTest(unittest.TestCase): ...@@ -55,6 +56,21 @@ class DataModelTest(unittest.TestCase):
assert len(exist) == 1 assert len(exist) == 1
assert exist[0].name == "TestRecord" 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): def tearDown(self):
try: try:
tests = db.execute_query("FIND ENTITY test*") tests = db.execute_query("FIND ENTITY test*")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment