diff options
Diffstat (limited to 'archaeological_operations/tests.py')
| -rw-r--r-- | archaeological_operations/tests.py | 15 | 
1 files changed, 15 insertions, 0 deletions
| diff --git a/archaeological_operations/tests.py b/archaeological_operations/tests.py index 0d6908374..91050dc1f 100644 --- a/archaeological_operations/tests.py +++ b/archaeological_operations/tests.py @@ -895,6 +895,21 @@ class OperationTest(TestCase, OperationInitTest):          self.assertEqual(ope_id, 'OP2011-1')          self.assertEqual(town, self.towns[0].name) +    def test_search_vector_update(self): +        operation = self.operations[0] +        town = self.create_towns({'numero_insee': '12346', 'name': 'Daisy'})[-1] +        operation.towns.add(town) +        town = self.create_towns( +            {'numero_insee': '12347', 'name': 'Dirty old'})[-1] +        operation.towns.add(town) +        operation = models.Operation.objects.get(pk=operation.pk) +        operation.comment = u"Zardoz" +        operation.code_patriarche = u"HUIAAA5" +        operation.save() +        for key in ('old', 'op2010', 'dirty', 'daisy', "'2010'", "zardoz", +                    "huiaaa5"): +            self.assertIn(key, operation.search_vector) +      def test_cache_bulk_update(self):          if settings.USE_SPATIALITE_FOR_TESTS:              # using views - can only be tested with postgresql | 
