From e2417010daf697d5a58bc2057a24b7785c4cef03 Mon Sep 17 00:00:00 2001 From: Mariusz Felisiak Date: Fri, 13 Mar 2020 12:00:48 +0100 Subject: [PATCH] Refs #31304 -- Added tests for using __search lookup with combined SearchQuerys with the same config. --- tests/postgres_tests/test_search.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/postgres_tests/test_search.py b/tests/postgres_tests/test_search.py index 86a409afc2e..0e836e896b7 100644 --- a/tests/postgres_tests/test_search.py +++ b/tests/postgres_tests/test_search.py @@ -365,6 +365,15 @@ class TestCombinations(GrailTestData, PostgreSQLTestCase): ) self.assertCountEqual(searched, [self.french, self.verse2]) + def test_combined_configs(self): + searched = Line.objects.filter( + dialogue__search=( + SearchQuery('nostrils', config='simple') & + SearchQuery('bowels', config='simple') + ), + ) + self.assertSequenceEqual(searched, [self.verse2]) + @skipUnlessDBFeature('has_phraseto_tsquery') def test_combine_raw_phrase(self): searched = Line.objects.filter(