summaryrefslogtreecommitdiff
path: root/archaeological_context_records/tests.py
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2017-10-12 16:33:24 +0200
committerÉtienne Loks <etienne.loks@iggdrasil.net>2017-10-12 16:33:24 +0200
commit2f61567837dab3e2e7354d8b81e844596046cb2a (patch)
tree66df3422b057c773b3088d2746323389bedad517 /archaeological_context_records/tests.py
parent6776fd5a5d88667d58085441facb7fa0c98b76da (diff)
downloadIshtar-2f61567837dab3e2e7354d8b81e844596046cb2a.tar.bz2
Ishtar-2f61567837dab3e2e7354d8b81e844596046cb2a.zip
Search vectors manage integration of parent vectors (refs #2912)
Diffstat (limited to 'archaeological_context_records/tests.py')
-rw-r--r--archaeological_context_records/tests.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/archaeological_context_records/tests.py b/archaeological_context_records/tests.py
index 89b15fbbf..029246235 100644
--- a/archaeological_context_records/tests.py
+++ b/archaeological_context_records/tests.py
@@ -273,6 +273,20 @@ class ContextRecordTest(ContextRecordInit, TestCase):
cr.operation
)
+ def test_search_vector_update(self):
+ cr = self.create_context_record(force=True)[0]
+ cr = models.ContextRecord.objects.get(pk=cr.pk)
+ cr.label = "Label label"
+ cr.location = "I am heeere"
+ cr.save()
+ for key in ('label', 'heeer'):
+ self.assertIn(key, cr.search_vector)
+ cr.operation.code_patriarche = "PATRIARCHE"
+ cr.operation.save()
+ cr = models.ContextRecord.objects.get(pk=cr.pk)
+ self.assertIn(settings.ISHTAR_OPE_PREFIX.lower() + "patriarch",
+ cr.search_vector)
+
def test_upstream_cache_update(self):
cr = self.create_context_record()[0]
cr_pk = cr.pk