@@ -48,10 +48,7 @@ def test_show_message(self):
48
48
49
49
message_text = "1653401204784D[type: -100,-1]=Gaia dev is under maintenance"
50
50
51
- dummy_response .set_data (method = 'GET' ,
52
- context = None ,
53
- body = message_text ,
54
- headers = None )
51
+ dummy_response .set_data (method = 'GET' , body = message_text )
55
52
connHandler .set_default_response (dummy_response )
56
53
57
54
# show_server_messages
@@ -69,10 +66,7 @@ def test_query_object(self):
69
66
70
67
message_text = "1653401204784D[type: -100,-1]=Gaia dev is under maintenance"
71
68
72
- dummy_response .set_data (method = 'GET' ,
73
- context = None ,
74
- body = message_text ,
75
- headers = None )
69
+ dummy_response .set_data (method = 'GET' , body = message_text )
76
70
conn_handler .set_default_response (dummy_response )
77
71
78
72
# show_server_messages
@@ -86,10 +80,7 @@ def test_query_object(self):
86
80
response_launch_job = DummyResponse (200 )
87
81
job_data_file = data_path ('job_1.vot' )
88
82
job_data = utils .read_file_content (job_data_file )
89
- response_launch_job .set_data (method = 'POST' ,
90
- context = None ,
91
- body = job_data ,
92
- headers = None )
83
+ response_launch_job .set_data (method = 'POST' , body = job_data )
93
84
# The query contains decimals: force default response
94
85
conn_handler .set_default_response (response_launch_job )
95
86
sc = SkyCoord (ra = 29.0 , dec = 15.0 , unit = (u .degree , u .degree ),
@@ -167,27 +158,18 @@ def test_query_object_async(self):
167
158
launch_response_headers = [
168
159
['location' , 'http://test:1111/tap/async/' + jobid ]
169
160
]
170
- response_launch_job .set_data (method = 'POST' ,
171
- context = None ,
172
- body = None ,
173
- headers = launch_response_headers )
161
+ response_launch_job .set_data (method = 'POST' , headers = launch_response_headers )
174
162
conn_handler .set_default_response (response_launch_job )
175
163
# Phase response
176
164
response_phase = DummyResponse (200 )
177
- response_phase .set_data (method = 'GET' ,
178
- context = None ,
179
- body = "COMPLETED" ,
180
- headers = None )
165
+ response_phase .set_data (method = 'GET' , body = "COMPLETED" )
181
166
req = "async/" + jobid + "/phase"
182
167
conn_handler .set_response (req , response_phase )
183
168
# Results response
184
169
response_results_job = DummyResponse (200 )
185
170
job_data_file = data_path ('job_1.vot' )
186
171
job_data = utils .read_file_content (job_data_file )
187
- response_results_job .set_data (method = 'GET' ,
188
- context = None ,
189
- body = job_data ,
190
- headers = None )
172
+ response_results_job .set_data (method = 'GET' , body = job_data )
191
173
req = "async/" + jobid + "/results/result"
192
174
conn_handler .set_response (req , response_results_job )
193
175
sc = SkyCoord (ra = 29.0 , dec = 15.0 , unit = (u .degree , u .degree ),
@@ -254,10 +236,7 @@ def test_cone_search_sync(self):
254
236
response_launch_job = DummyResponse (200 )
255
237
job_data_file = data_path ('job_1.vot' )
256
238
job_data = utils .read_file_content (job_data_file )
257
- response_launch_job .set_data (method = 'POST' ,
258
- context = None ,
259
- body = job_data ,
260
- headers = None )
239
+ response_launch_job .set_data (method = 'POST' , body = job_data )
261
240
ra = 19.0
262
241
dec = 20.0
263
242
sc = SkyCoord (ra = ra , dec = dec , unit = (u .degree , u .degree ), frame = 'icrs' )
@@ -307,31 +286,22 @@ def test_cone_search_async(self):
307
286
launch_response_headers = [
308
287
['location' , 'http://test:1111/tap/async/' + jobid ]
309
288
]
310
- response_launch_job .set_data (method = 'POST' ,
311
- context = None ,
312
- body = None ,
313
- headers = launch_response_headers )
289
+ response_launch_job .set_data (method = 'POST' , headers = launch_response_headers )
314
290
ra = 19
315
291
dec = 20
316
292
sc = SkyCoord (ra = ra , dec = dec , unit = (u .degree , u .degree ), frame = 'icrs' )
317
293
radius = Quantity (1.0 , u .deg )
318
294
conn_handler .set_default_response (response_launch_job )
319
295
# Phase response
320
296
response_phase = DummyResponse (200 )
321
- response_phase .set_data (method = 'GET' ,
322
- context = None ,
323
- body = "COMPLETED" ,
324
- headers = None )
297
+ response_phase .set_data (method = 'GET' , body = "COMPLETED" )
325
298
req = "async/" + jobid + "/phase"
326
299
conn_handler .set_response (req , response_phase )
327
300
# Results response
328
301
response_results_job = DummyResponse (200 )
329
302
job_data_file = data_path ('job_1.vot' )
330
303
job_data = utils .read_file_content (job_data_file )
331
- response_results_job .set_data (method = 'GET' ,
332
- context = None ,
333
- body = job_data ,
334
- headers = None )
304
+ response_results_job .set_data (method = 'GET' , body = job_data )
335
305
req = "async/" + jobid + "/results/result"
336
306
conn_handler .set_response (req , response_results_job )
337
307
job = tap .cone_search_async (sc , radius )
@@ -459,27 +429,18 @@ def test_xmatch(self):
459
429
launch_response_headers = [
460
430
['location' , 'http://test:1111/tap/async/' + jobid ]
461
431
]
462
- response_launch_job .set_data (method = 'POST' ,
463
- context = None ,
464
- body = None ,
465
- headers = launch_response_headers )
432
+ response_launch_job .set_data (method = 'POST' , headers = launch_response_headers )
466
433
conn_handler .set_default_response (response_launch_job )
467
434
# Phase response
468
435
response_phase = DummyResponse (200 )
469
- response_phase .set_data (method = 'GET' ,
470
- context = None ,
471
- body = "COMPLETED" ,
472
- headers = None )
436
+ response_phase .set_data (method = 'GET' , body = "COMPLETED" )
473
437
req = "async/" + jobid + "/phase"
474
438
conn_handler .set_response (req , response_phase )
475
439
# Results response
476
440
response_results_job = DummyResponse (200 )
477
441
job_data_file = data_path ('job_1.vot' )
478
442
job_data = utils .read_file_content (job_data_file )
479
- response_results_job .set_data (method = 'GET' ,
480
- context = None ,
481
- body = job_data ,
482
- headers = None )
443
+ response_results_job .set_data (method = 'GET' , body = job_data )
483
444
req = "async/" + jobid + "/results/result"
484
445
conn_handler .set_response (req , response_results_job )
485
446
query = ("SELECT crossmatch_positional(" ,
0 commit comments