Add tests on the euristic to compute the full text search configuration
issue11130 review395301002
This commit is contained in:
1 parent
7e3007ede1
commit
2147a5de01
1 file changed
+7
-1
@@ -243,8 +243,10 @@ class CommonTestCaseMixin:
|
||||
def test_search_ilike(self):
|
||||
"Test search text ilike"
|
||||
Text = self.Text()
|
||||
text, = Text.create([{
|
||||
text, sambreville = Text.create([{
|
||||
'text': "Bar",
|
||||
}, {
|
||||
'text': "Sambreville",
|
||||
}])
|
||||
with Transaction().set_context({
|
||||
'%s.text.search_full_text' % Text.__name__: False,
|
||||
@@ -267,6 +269,10 @@ class CommonTestCaseMixin:
|
||||
self.assertListEqual(texts_foo, [])
|
||||
self.assertListEqual(texts_f, [])
|
||||
|
||||
self.assertListEqual(
|
||||
Text.search([('text', 'ilike', "%Sambreville%")]),
|
||||
[sambreville])
|
||||
|
||||
@unittest.skipIf(backend.name == 'sqlite',
|
||||
"SQLite does not have full text search")
|
||||
@with_transaction()
|
||||
|
||||
Reference in new issue
Block a user