@@ -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/vnd.elasticsearch+ json; compatible-with=8 " ,
142
+ "accept" : "application/json" ,
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/vnd.elasticsearch+ json; compatible-with=8 " ,
160
+ "accept" : "application/json" ,
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/vnd.elasticsearch+ json; compatible-with=8 " ,
185
+ "accept" : "application/json" ,
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/vnd.elasticsearch+ json; compatible-with=8 " ,
212
+ "accept" : "application/json" ,
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/vnd.elasticsearch+ json; compatible-with=8 " ,
230
+ "accept" : "application/json" ,
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/vnd.elasticsearch+ json; compatible-with=8 " ,
255
+ "accept" : "application/json" ,
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/vnd.elasticsearch+ json; compatible-with=8 " ,
297
+ "accept" : "application/json" ,
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/vnd.elasticsearch+ json; compatible-with=8 " ,
306
+ "accept" : "application/json" ,
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/vnd.elasticsearch+ json; compatible-with=8 " ,
314
+ "accept" : "application/json" ,
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/vnd.elasticsearch+ json; compatible-with=8 " ,
341
+ "accept" : "application/json" ,
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/vnd.elasticsearch+ json; compatible-with=8 " ,
348
+ "accept" : "application/json" ,
349
349
}
350
350
351
351
client = Elasticsearch (
@@ -359,14 +359,14 @@ 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/vnd.elasticsearch+ json; compatible-with=8 " ,
362
+ "accept" : "application/json" ,
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/vnd.elasticsearch+ json; compatible-with=8 " ,
369
+ "accept" : "application/json" ,
370
370
}
371
371
372
372
def test_options_timeout_parameters (self ):
@@ -387,7 +387,7 @@ def test_options_timeout_parameters(self):
387
387
assert call .pop ("client_meta" ) is DEFAULT
388
388
assert call == {
389
389
"headers" : {
390
- "accept" : "application/vnd.elasticsearch+ json; compatible-with=8 " ,
390
+ "accept" : "application/json" ,
391
391
},
392
392
"body" : None ,
393
393
"request_timeout" : 1 ,
@@ -416,7 +416,7 @@ def test_options_timeout_parameters(self):
416
416
assert call .pop ("client_meta" ) is DEFAULT
417
417
assert call == {
418
418
"headers" : {
419
- "accept" : "application/vnd.elasticsearch+ json; compatible-with=8 " ,
419
+ "accept" : "application/json" ,
420
420
},
421
421
"body" : None ,
422
422
"request_timeout" : 2 ,
@@ -440,7 +440,7 @@ def test_options_timeout_parameters(self):
440
440
assert call .pop ("client_meta" ) is DEFAULT
441
441
assert call == {
442
442
"headers" : {
443
- "accept" : "application/vnd.elasticsearch+ json; compatible-with=8 " ,
443
+ "accept" : "application/json" ,
444
444
},
445
445
"body" : None ,
446
446
}
@@ -461,7 +461,7 @@ def test_options_timeout_parameters(self):
461
461
assert call .pop ("client_meta" ) is DEFAULT
462
462
assert call == {
463
463
"headers" : {
464
- "accept" : "application/vnd.elasticsearch+ json; compatible-with=8 " ,
464
+ "accept" : "application/json" ,
465
465
},
466
466
"body" : None ,
467
467
"request_timeout" : 1 ,
0 commit comments