diff options
Diffstat (limited to 'archaeological_context_records/tests.py')
| -rw-r--r-- | archaeological_context_records/tests.py | 6 | 
1 files changed, 6 insertions, 0 deletions
diff --git a/archaeological_context_records/tests.py b/archaeological_context_records/tests.py index aa98d83a8..764750cf6 100644 --- a/archaeological_context_records/tests.py +++ b/archaeological_context_records/tests.py @@ -293,6 +293,7 @@ class ContextRecordTest(ContextRecordInit, TestCase):          cr.location = "I am heeere"          cr.save()          cr = models.ContextRecord.objects.get(pk=cr.pk) +        self.assertIsNotNone(cr.search_vector)          for key in ('label', 'heeer'):              self.assertIn(key, cr.search_vector)          cr.operation.code_patriarche = "PATRIARCHE" @@ -300,12 +301,14 @@ class ContextRecordTest(ContextRecordInit, TestCase):          cr = models.ContextRecord.objects.get(pk=cr.pk)          profile = get_current_profile() +        self.assertIsNotNone(cr.cached_label)          self.assertIn(profile.operation_prefix.lower() + "patriarch",                        cr.search_vector)      def test_upstream_cache_update(self):          cr = self.create_context_record()[0]          cr_pk = cr.pk +        self.assertIsNotNone(cr.cached_label)          # OP2010 - 1 | A | 1 | CR 1          ope_id, parcel_sec, parcel_nb, cr_label = cr.cached_label.split(' | ')          self.assertEqual(ope_id, 'OP2010-1') @@ -317,6 +320,7 @@ class ContextRecordTest(ContextRecordInit, TestCase):          cr.label = new_lbl          cr.save()          cr = models.ContextRecord.objects.get(pk=cr_pk) +        self.assertIsNotNone(cr.cached_label)          ope_id, parcel_sec, parcel_nb, cr_label = cr.cached_label.split(' | ')          self.assertEqual(cr_label, new_lbl) @@ -326,6 +330,7 @@ class ContextRecordTest(ContextRecordInit, TestCase):          parcel.parcel_number = new_nb          parcel.save()          cr = models.ContextRecord.objects.get(pk=cr_pk) +        self.assertIsNotNone(cr.cached_label)          ope_id, parcel_sec, parcel_nb, cr_label = cr.cached_label.split(' | ')          self.assertEqual(parcel_sec, new_sec)          self.assertEqual(parcel_nb, new_nb) @@ -333,6 +338,7 @@ class ContextRecordTest(ContextRecordInit, TestCase):          cr.operation.year = 2017          cr.operation.save()          cr = models.ContextRecord.objects.get(pk=cr_pk) +        self.assertIsNotNone(cr.cached_label)          ope_id, parcel_sec, parcel_nb, cr_label = cr.cached_label.split(' | ')          self.assertEqual(ope_id, 'OP2017-1')  | 
