From 913c73192d4b25ec68338116b08b6c9d36f9f96f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Henrik=20tom=20W=C3=B6rden?= <henrik@trineo.org>
Date: Fri, 2 Jul 2021 17:37:55 +0200
Subject: [PATCH] test

---
 integrationtests/filldb.sh      |  1 +
 integrationtests/insert_some.py | 19 +++++++++++++++++++
 2 files changed, 20 insertions(+)
 create mode 100644 integrationtests/insert_some.py

diff --git a/integrationtests/filldb.sh b/integrationtests/filldb.sh
index 98d22347..9f55365e 100755
--- a/integrationtests/filldb.sh
+++ b/integrationtests/filldb.sh
@@ -7,4 +7,5 @@ python3 -m caosadvancedtools.loadFiles /opt/caosdb/mnt/extroot/SimulationData
 python3 -m caosadvancedtools.loadFiles /opt/caosdb/mnt/extroot/Publications
 python3 -m caosadvancedtools.loadFiles /opt/caosdb/mnt/extroot/Software
 python3 insert_model.py 
+python3 insert_some.py
 python3 crawl.py /
diff --git a/integrationtests/insert_some.py b/integrationtests/insert_some.py
new file mode 100644
index 00000000..f5b32af1
--- /dev/null
+++ b/integrationtests/insert_some.py
@@ -0,0 +1,19 @@
+#!/usr/bin/env python3
+import caosdb as db
+from caosadvancedtools.scifolder.experiment_cfood import dm
+
+# This inserts two identifiables. When no dependencies are possible among
+# identifiables, it should not be possible to find both: the experiment
+# identifiable would for example not reference the correct project Record
+project = db.Record(name='2010_TestProject')
+project.add_parent(name=dm.Project)
+project.insert()
+
+experiment = db.Record()
+experiment.add_parent(name=dm.Experiment)
+experiment.add_property(
+    name=dm.date, value='2019-02-03')
+experiment.add_property(name=dm.Project, value=project)
+experiment.add_property(
+        name="identifier", value="empty_identifier")
+experiment.insert()
-- 
GitLab