diff options
Diffstat (limited to 'archaeological_operations/tests.py')
| -rw-r--r-- | archaeological_operations/tests.py | 9 | 
1 files changed, 9 insertions, 0 deletions
| diff --git a/archaeological_operations/tests.py b/archaeological_operations/tests.py index 9a5f35d9b..36b96176a 100644 --- a/archaeological_operations/tests.py +++ b/archaeological_operations/tests.py @@ -2866,6 +2866,7 @@ class OperationSearchTest(TestCase, OperationInitTest, SearchText):          # test vector search with accents          operation = models.Operation.objects.get(pk=self.operations[0].pk)          operation.common_name = "Opération : Château de Fougères" +        operation.operator_reference = "ROYER"          operation.save()          response = c.get(reverse("get-operation"), {"search_vector": "chaTEAU"})          result = json.loads(response.content.decode()) @@ -2877,6 +2878,14 @@ class OperationSearchTest(TestCase, OperationInitTest, SearchText):          response = c.get(reverse("get-operation"), {"search_vector": "chaTEAU - "})          result = json.loads(response.content.decode())          self.assertEqual(result["recordsTotal"], 1) +        # test french search +        response = c.get(reverse("get-operation"), {"search_vector": "roye"}) +        result = json.loads(response.content.decode()) +        self.assertEqual(result["recordsTotal"], 1) +        # test simple search +        response = c.get(reverse("get-operation"), {"search_vector": "royer"}) +        result = json.loads(response.content.decode()) +        self.assertEqual(result["recordsTotal"], 1)      def test_complex_search_vector(self):          c = Client() | 
