[FIX] test_website: fix test when trigram psql extention is installed.

When we want to activate trigram psql extension for odoo/odoo#97294
on runbot. But one test fails (`test_01_many_records`) with it because
the website fuzzy search behavior depends on trigram extension presence.

closes odoo/odoo#98018

X-original-commit: 0562a17f8ca1be83c80372e2300e24ab9d0458a9
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Signed-off-by: Raphael Collet <rco@odoo.com>
This commit is contained in:
Rémy Voet (ryv)
2022-08-12 08:53:59 +02:00
parent 12df988766
commit 6e1bb5ca3e
+1 -1
View File
@@ -44,7 +44,7 @@ class TestAutoComplete(TransactionCase):
# => Find exact match through the fallback
self._autocomplete('REF3000', 1, False)
# => No exact match => Find fuzzy within first 1000 (distance=3: replace D by F, move 3, add 1)
self._autocomplete('RED3000', 1, 'ref1003')
self._autocomplete('RED3000', 1, 'ref3000' if self.env.registry.has_trigram else 'ref1003')
# => Find exact match through the fallback
self._autocomplete('REF300', 10, False)
# => Find exact match through the fallback