Skip to content
Snippets Groups Projects

F schema export references

Merged Florian Spreckelsen requested to merge f-schema-export-references into dev
All threads resolved!
Files
9
import unittest
import pytest
import caosdb as db
from caosadvancedtools.models.data_model import DataModel
@@ -55,6 +56,19 @@ class DataModelTest(unittest.TestCase):
assert len(exist) == 1
assert exist[0].name == "TestRecord"
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*")
Loading