@@ -35,7 +35,8 @@ def test_multi_search_on_no_index(client):
35
35
client .multi_search ([{"indexUid" : "indexDoesNotExist" , "q" : "" }])
36
36
37
37
38
- def test_multi_search_with_no_value_in_federation (client , empty_index , index_with_documents ):
38
+ def test_multi_search_with_no_value_in_federation (client , empty_index ,
39
+ index_with_documents ):
39
40
"""Tests multi-search with federation, but no value"""
40
41
index_with_documents ()
41
42
empty_index ("indexB" )
@@ -48,11 +49,15 @@ def test_multi_search_with_no_value_in_federation(client, empty_index, index_wit
48
49
assert response ["limit" ] == 20
49
50
assert response ["offset" ] == 0
50
51
51
- def test_multi_search_with_offset_and_limit_in_federation (client , index_with_documents ):
52
+
53
+ def test_multi_search_with_offset_and_limit_in_federation (
54
+ client ,
55
+ index_with_documents ):
52
56
"""Tests multi-search with federation, with offset and limit value"""
53
57
index_with_documents ()
54
- response = client .multi_search ([{"indexUid" : INDEX_UID , "q" : "" }], {"offset" : 2 , "limit" : 2 })
55
-
58
+ response = client .multi_search ([{"indexUid" : INDEX_UID , "q" : "" }],
59
+ {"offset" : 2 , "limit" : 2 })
60
+
56
61
assert "results" not in response
57
62
assert len (response ["hits" ]) == 2
58
63
assert "_federation" in response ["hits" ][0 ]
@@ -63,7 +68,9 @@ def test_multi_search_with_offset_and_limit_in_federation(client, index_with_doc
63
68
def test_multi_search_with_federation_options (client , index_with_documents ):
64
69
"""Tests multi-search with federation, with federation options"""
65
70
index_with_documents ()
66
- response = client .multi_search ([{"indexUid" : INDEX_UID , "q" : "" , "federationOptions" : {"weight" : 0.99 }}], {"limit" : 2 })
71
+ response = client .multi_search (
72
+ [{"indexUid" : INDEX_UID , "q" : "" ,
73
+ "federationOptions" : {"weight" : 0.99 }}], {"limit" : 2 })
67
74
68
75
assert "results" not in response
69
76
assert response ["hits" ][0 ]["_federation" ]["indexUid" ] == INDEX_UID
0 commit comments