@@ -123,7 +123,6 @@ def test_custom_search_params_with_facets_distribution(index_with_documents):
123
123
'facetsDistribution' : ['genre' ]
124
124
}
125
125
)
126
- print (response ['facetsDistribution' ])
127
126
assert isinstance (response , dict )
128
127
assert len (response ['hits' ]) == 12
129
128
assert 'facetsDistribution' in response
@@ -133,54 +132,3 @@ def test_custom_search_params_with_facets_distribution(index_with_documents):
133
132
assert response ['facetsDistribution' ]['genre' ]['cartoon' ] == 1
134
133
assert response ['facetsDistribution' ]['genre' ]['action' ] == 3
135
134
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