diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2019-04-08 17:53:45 +0200 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2019-04-24 19:42:35 +0200 |
commit | f8bcac5410d931cf427abcfdd1151c6d8bf3e660 (patch) | |
tree | 501f7aaef98bd9d80ab93c80aafe8913548898c7 /archaeological_operations | |
parent | 8d480e2dfef30252f9ef35c60c66e8876fd464f1 (diff) | |
download | Ishtar-f8bcac5410d931cf427abcfdd1151c6d8bf3e660.tar.bz2 Ishtar-f8bcac5410d931cf427abcfdd1151c6d8bf3e660.zip |
Search: manage asterisk inside search query (refs #4480)
Diffstat (limited to 'archaeological_operations')
-rw-r--r-- | archaeological_operations/tests.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/archaeological_operations/tests.py b/archaeological_operations/tests.py index 3f659ef3b..b5680a6fd 100644 --- a/archaeological_operations/tests.py +++ b/archaeological_operations/tests.py @@ -1814,6 +1814,18 @@ class OperationSearchTest(TestCase, OperationInitTest): self._test_search(c, search_name_q, lbl, 1, "Facet search with = and | characters") + def test_search_with_asterisk_inside_names(self): + c = Client() + c.login(username=self.username, password=self.password) + ope = self.operations[0] + ope_type = ope.operation_type + ope_type.label = 'label*with*asterisk' + ope_type.save() + search_name_q = str(pgettext("key for text search", u"type")) + nb = models.Operation.objects.filter(operation_type=ope_type).count() + self._test_search(c, search_name_q, ope_type.label, nb, + "Facet search with * characters") + def test_hierarchic_search(self): ope = self.operations[1] c = Client() |