mirror of
https://github.com/Hopiu/django-watson.git
synced 2026-03-16 22:00:22 +00:00
Adding in test for searching with leading apostrophe
This commit is contained in:
parent
acf2100b6c
commit
455a61f9d9
1 changed files with 8 additions and 0 deletions
|
|
@ -291,6 +291,14 @@ class SearchTest(SearchTestBase):
|
|||
description = "description model1 instance13",
|
||||
)
|
||||
self.assertEqual(watson.search("d'Argent").count(), 1)
|
||||
|
||||
def testSearchWithLeadingApostrophe(self):
|
||||
WatsonTestModel1.objects.create(
|
||||
title = "title model1 instance12",
|
||||
content = "'content model1 instance13",
|
||||
description = "description model1 instance13",
|
||||
)
|
||||
self.assertEqual(watson.search("'content").count(), 1)
|
||||
|
||||
@skipUnless(get_backend().supports_prefix_matching, "Search backend does not support prefix matching.")
|
||||
def testMultiTablePrefixSearch(self):
|
||||
|
|
|
|||
Loading…
Reference in a new issue