diff options
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 |
commit | d644ad71585c5ebf2113f2c538c38c775b334228 (patch) | |
tree | 66df3422b057c773b3088d2746323389bedad517 /archaeological_context_records/tests.py | |
parent | 88f2d0dc710674aa5017271b1d558a1da2ecdd1e (diff) | |
download | Ishtar-d644ad71585c5ebf2113f2c538c38c775b334228.tar.bz2 Ishtar-d644ad71585c5ebf2113f2c538c38c775b334228.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.py | 14 |
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 |