@@ -139,7 +139,7 @@ def test_options_passed_to_perform_request(self):
139
139
assert call .pop ("client_meta" ) is DEFAULT
140
140
assert call == {
141
141
"headers" : {
142
- "accept" : "application/json" ,
142
+ "accept" : "application/vnd.elasticsearch+ json; compatible-with=8 " ,
143
143
},
144
144
"body" : None ,
145
145
}
@@ -157,7 +157,7 @@ def test_options_passed_to_perform_request(self):
157
157
assert call .pop ("client_meta" ) is DEFAULT
158
158
assert call == {
159
159
"headers" : {
160
- "accept" : "application/json" ,
160
+ "accept" : "application/vnd.elasticsearch+ json; compatible-with=8 " ,
161
161
},
162
162
"body" : None ,
163
163
"request_timeout" : 1 ,
@@ -182,7 +182,7 @@ def test_options_passed_to_perform_request(self):
182
182
assert call .pop ("client_meta" ) is DEFAULT
183
183
assert call == {
184
184
"headers" : {
185
- "accept" : "application/json" ,
185
+ "accept" : "application/vnd.elasticsearch+ json; compatible-with=8 " ,
186
186
},
187
187
"body" : None ,
188
188
"request_timeout" : 1 ,
@@ -209,7 +209,7 @@ async def test_options_passed_to_async_perform_request(self):
209
209
assert call .pop ("client_meta" ) is DEFAULT
210
210
assert call == {
211
211
"headers" : {
212
- "accept" : "application/json" ,
212
+ "accept" : "application/vnd.elasticsearch+ json; compatible-with=8 " ,
213
213
},
214
214
"body" : None ,
215
215
}
@@ -227,7 +227,7 @@ async def test_options_passed_to_async_perform_request(self):
227
227
assert call .pop ("client_meta" ) is DEFAULT
228
228
assert call == {
229
229
"headers" : {
230
- "accept" : "application/json" ,
230
+ "accept" : "application/vnd.elasticsearch+ json; compatible-with=8 " ,
231
231
},
232
232
"body" : None ,
233
233
"request_timeout" : 1 ,
@@ -252,7 +252,7 @@ async def test_options_passed_to_async_perform_request(self):
252
252
assert call .pop ("client_meta" ) is DEFAULT
253
253
assert call == {
254
254
"headers" : {
255
- "accept" : "application/json" ,
255
+ "accept" : "application/vnd.elasticsearch+ json; compatible-with=8 " ,
256
256
},
257
257
"body" : None ,
258
258
"request_timeout" : 1 ,
@@ -294,7 +294,7 @@ def test_http_headers_overrides(self):
294
294
295
295
assert call ["headers" ] == {
296
296
"key" : "val" ,
297
- "accept" : "application/json" ,
297
+ "accept" : "application/vnd.elasticsearch+ json; compatible-with=8 " ,
298
298
}
299
299
300
300
client .options (headers = {"key1" : "val" }).indices .get (index = "2" )
@@ -303,15 +303,15 @@ def test_http_headers_overrides(self):
303
303
assert call ["headers" ] == {
304
304
"key" : "val" ,
305
305
"key1" : "val" ,
306
- "accept" : "application/json" ,
306
+ "accept" : "application/vnd.elasticsearch+ json; compatible-with=8 " ,
307
307
}
308
308
309
309
client .options (headers = {"key" : "val2" }).indices .get (index = "3" )
310
310
call = calls [("GET" , "/3" )][0 ]
311
311
312
312
assert call ["headers" ] == {
313
313
"key" : "val2" ,
314
- "accept" : "application/json" ,
314
+ "accept" : "application/vnd.elasticsearch+ json; compatible-with=8 " ,
315
315
}
316
316
317
317
client = Elasticsearch (
@@ -338,14 +338,14 @@ def test_user_agent_override(self):
338
338
call = calls [("GET" , "/1" )][0 ]
339
339
assert call ["headers" ] == {
340
340
"user-agent" : "custom1" ,
341
- "accept" : "application/json" ,
341
+ "accept" : "application/vnd.elasticsearch+ json; compatible-with=8 " ,
342
342
}
343
343
344
344
client .indices .get (index = "2" , headers = {"user-agent" : "custom2" })
345
345
call = calls [("GET" , "/2" )][0 ]
346
346
assert call ["headers" ] == {
347
347
"user-agent" : "custom2" ,
348
- "accept" : "application/json" ,
348
+ "accept" : "application/vnd.elasticsearch+ json; compatible-with=8 " ,
349
349
}
350
350
351
351
client = Elasticsearch (
@@ -359,12 +359,12 @@ def test_user_agent_override(self):
359
359
call = calls [("GET" , "/1" )][0 ]
360
360
assert call ["headers" ] == {
361
361
"user-agent" : "custom3" ,
362
- "accept" : "application/json" ,
362
+ "accept" : "application/vnd.elasticsearch+ json; compatible-with=8 " ,
363
363
}
364
364
365
365
client .indices .get (index = "2" , headers = {"user-agent" : "custom4" })
366
366
call = calls [("GET" , "/2" )][0 ]
367
367
assert call ["headers" ] == {
368
368
"user-agent" : "custom4" ,
369
- "accept" : "application/json" ,
369
+ "accept" : "application/vnd.elasticsearch+ json; compatible-with=8 " ,
370
370
}
0 commit comments