Skip to content

Commit 124effd

Browse files
committed
Clean facetFilters tests
1 parent 839c4ca commit 124effd

File tree

1 file changed

+0
-52
lines changed

1 file changed

+0
-52
lines changed

meilisearch/tests/index/test_index_search_meilisearch.py

Lines changed: 0 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,6 @@ def test_custom_search_params_with_facets_distribution(index_with_documents):
123123
'facetsDistribution': ['genre']
124124
}
125125
)
126-
print(response['facetsDistribution'])
127126
assert isinstance(response, dict)
128127
assert len(response['hits']) == 12
129128
assert 'facetsDistribution' in response
@@ -133,54 +132,3 @@ def test_custom_search_params_with_facets_distribution(index_with_documents):
133132
assert response['facetsDistribution']['genre']['cartoon'] == 1
134133
assert response['facetsDistribution']['genre']['action'] == 3
135134
assert response['facetsDistribution']['genre']['fantasy'] == 1
136-
137-
# def test_custom_search_params_with_facet_filters(index_with_documents):
138-
# index = index_with_documents()
139-
# update = index.update_filterable_attributes(['genre'])
140-
# index.wait_for_pending_update(update['updateId'])
141-
# response = index.search(
142-
# 'world',
143-
# {
144-
# 'facetFilters': [['genre:action']]
145-
# }
146-
# )
147-
# assert isinstance(response, dict)
148-
# assert len(response['hits']) == 3
149-
# assert 'facetsDistribution' not in response
150-
# assert 'exhaustiveFacetsCount' not in response
151-
152-
# def test_custom_search_params_with_multiple_facet_filters(index_with_documents):
153-
# index = index_with_documents()
154-
# update = index.update_filterable_attributes(['genre'])
155-
# index.wait_for_pending_update(update['updateId'])
156-
# response = index.search(
157-
# 'world',
158-
# {
159-
# 'facetFilters': ['genre:action', ['genre:action', 'genre:action']]
160-
# }
161-
# )
162-
# assert isinstance(response, dict)
163-
# assert len(response['hits']) == 3
164-
# assert 'facetsDistribution' not in response
165-
# assert 'exhaustiveFacetsCount' not in response
166-
167-
# def test_custom_search_params_with_many_params(index_with_documents):
168-
# index = index_with_documents()
169-
# update = index.update_filterable_attributes(['genre'])
170-
# index.wait_for_pending_update(update['updateId'])
171-
# response = index.search(
172-
# 'world',
173-
# {
174-
# 'facetFilters': [['genre:action']],
175-
# 'attributesToRetrieve': ['title', 'poster']
176-
# }
177-
# )
178-
# assert isinstance(response, dict)
179-
# assert len(response['hits']) == 3
180-
# assert 'facetsDistribution' not in response
181-
# assert 'exhaustiveFacetsCount' not in response
182-
# assert 'title' in response['hits'][0]
183-
# assert 'poster' in response['hits'][0]
184-
# assert 'overview' not in response['hits'][0]
185-
# assert 'release_date' not in response['hits'][0]
186-
# assert response['hits'][0]['title'] == 'Avengers: Infinity War'

0 commit comments

Comments
 (0)