From 2147a5de015178767ebc7a545b2449bda4ae88ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20=C3=89vrard?= Date: Tue, 8 Feb 2022 18:45:42 +0100 Subject: [PATCH] Add tests on the euristic to compute the full text search configuration issue11130 review395301002 --- trytond/tests/test_field_text.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/trytond/tests/test_field_text.py b/trytond/tests/test_field_text.py index 6ae3bca91a..bae9038a38 100644 --- a/trytond/tests/test_field_text.py +++ b/trytond/tests/test_field_text.py @@ -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()