summaryrefslogtreecommitdiff
path: root/archaeological_context_records/tests.py
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2023-12-19 15:21:37 +0100
committerÉtienne Loks <etienne.loks@iggdrasil.net>2023-12-19 15:30:18 +0100
commit24200aa0983ea8f2979a3b06a6250b77c7a63849 (patch)
treecd77fa8e5f5da7f54b2de4929b1f7f5adc2b93b2 /archaeological_context_records/tests.py
parent080ba480fee53ce4fea26bc33bb6affc0729dda9 (diff)
downloadIshtar-24200aa0983ea8f2979a3b06a6250b77c7a63849.tar.bz2
Ishtar-24200aa0983ea8f2979a3b06a6250b77c7a63849.zip
🐛 context record relation: force one to one relation on context record relation -> fix archaeological find listing on context record sheet
Diffstat (limited to 'archaeological_context_records/tests.py')
-rw-r--r--archaeological_context_records/tests.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/archaeological_context_records/tests.py b/archaeological_context_records/tests.py
index 0d838f3ea..2804bbc45 100644
--- a/archaeological_context_records/tests.py
+++ b/archaeological_context_records/tests.py
@@ -1101,6 +1101,17 @@ class RecordRelationsTest(ContextRecordInit, TestCase):
1,
)
+ def test_simple_relation_tree(self):
+ profile = get_current_profile()
+ profile.parent_relations_engine = "T"
+ profile.save()
+ get_current_profile(force=True)
+ self.assertTrue(models.ContextRecordTree.check_engine()) # change to table
+ q = models.ContextRecordTree.objects
+ nb = q.count()
+ self.create_context_record({"label": "CR test"})
+ self.assertEqual(q.count(), nb + 1)
+
def test_relation_view(self):
profile = get_current_profile()
profile.parent_relations_engine = "V"