@@ -44,9 +44,7 @@ class TestTap:
44
44
def test_show_message (self ):
45
45
connHandler = DummyConnHandler ()
46
46
47
- dummy_response = DummyResponse ()
48
- dummy_response .set_status_code (200 )
49
- dummy_response .set_message ("OK" )
47
+ dummy_response = DummyResponse (200 )
50
48
51
49
message_text = "1653401204784D[type: -100,-1]=Gaia dev is under maintenance"
52
50
@@ -67,9 +65,7 @@ def test_query_object(self):
67
65
conn_handler = DummyConnHandler ()
68
66
# Launch response: we use default response because the query contains
69
67
# decimals
70
- dummy_response = DummyResponse ()
71
- dummy_response .set_status_code (200 )
72
- dummy_response .set_message ("OK" )
68
+ dummy_response = DummyResponse (200 )
73
69
74
70
message_text = "1653401204784D[type: -100,-1]=Gaia dev is under maintenance"
75
71
@@ -87,9 +83,7 @@ def test_query_object(self):
87
83
tap = GaiaClass (conn_handler , tapplus , show_server_messages = True )
88
84
# Launch response: we use default response because the query contains
89
85
# decimals
90
- response_launch_job = DummyResponse ()
91
- response_launch_job .set_status_code (200 )
92
- response_launch_job .set_message ("OK" )
86
+ response_launch_job = DummyResponse (200 )
93
87
job_data_file = data_path ('job_1.vot' )
94
88
job_data = utils .read_file_content (job_data_file )
95
89
response_launch_job .set_data (method = 'POST' ,
@@ -168,9 +162,7 @@ def test_query_object_async(self):
168
162
tap = GaiaClass (conn_handler , tapplus , show_server_messages = False )
169
163
jobid = '12345'
170
164
# Launch response
171
- response_launch_job = DummyResponse ()
172
- response_launch_job .set_status_code (303 )
173
- response_launch_job .set_message ("OK" )
165
+ response_launch_job = DummyResponse (303 )
174
166
# list of list (httplib implementation for headers in response)
175
167
launch_response_headers = [
176
168
['location' , 'http://test:1111/tap/async/' + jobid ]
@@ -181,19 +173,15 @@ def test_query_object_async(self):
181
173
headers = launch_response_headers )
182
174
conn_handler .set_default_response (response_launch_job )
183
175
# Phase response
184
- response_phase = DummyResponse ()
185
- response_phase .set_status_code (200 )
186
- response_phase .set_message ("OK" )
176
+ response_phase = DummyResponse (200 )
187
177
response_phase .set_data (method = 'GET' ,
188
178
context = None ,
189
179
body = "COMPLETED" ,
190
180
headers = None )
191
181
req = "async/" + jobid + "/phase"
192
182
conn_handler .set_response (req , response_phase )
193
183
# Results response
194
- response_results_job = DummyResponse ()
195
- response_results_job .set_status_code (200 )
196
- response_results_job .set_message ("OK" )
184
+ response_results_job = DummyResponse (200 )
197
185
job_data_file = data_path ('job_1.vot' )
198
186
job_data = utils .read_file_content (job_data_file )
199
187
response_results_job .set_data (method = 'GET' ,
@@ -263,9 +251,7 @@ def test_cone_search_sync(self):
263
251
tap = GaiaClass (conn_handler , tapplus , show_server_messages = False )
264
252
# Launch response: we use default response because the query contains
265
253
# decimals
266
- response_launch_job = DummyResponse ()
267
- response_launch_job .set_status_code (200 )
268
- response_launch_job .set_message ("OK" )
254
+ response_launch_job = DummyResponse (200 )
269
255
job_data_file = data_path ('job_1.vot' )
270
256
job_data = utils .read_file_content (job_data_file )
271
257
response_launch_job .set_data (method = 'POST' ,
@@ -316,9 +302,7 @@ def test_cone_search_async(self):
316
302
tap = GaiaClass (conn_handler , tapplus , show_server_messages = False )
317
303
jobid = '12345'
318
304
# Launch response
319
- response_launch_job = DummyResponse ()
320
- response_launch_job .set_status_code (303 )
321
- response_launch_job .set_message ("OK" )
305
+ response_launch_job = DummyResponse (303 )
322
306
# list of list (httplib implementation for headers in response)
323
307
launch_response_headers = [
324
308
['location' , 'http://test:1111/tap/async/' + jobid ]
@@ -333,19 +317,15 @@ def test_cone_search_async(self):
333
317
radius = Quantity (1.0 , u .deg )
334
318
conn_handler .set_default_response (response_launch_job )
335
319
# Phase response
336
- response_phase = DummyResponse ()
337
- response_phase .set_status_code (200 )
338
- response_phase .set_message ("OK" )
320
+ response_phase = DummyResponse (200 )
339
321
response_phase .set_data (method = 'GET' ,
340
322
context = None ,
341
323
body = "COMPLETED" ,
342
324
headers = None )
343
325
req = "async/" + jobid + "/phase"
344
326
conn_handler .set_response (req , response_phase )
345
327
# Results response
346
- response_results_job = DummyResponse ()
347
- response_results_job .set_status_code (200 )
348
- response_results_job .set_message ("OK" )
328
+ response_results_job = DummyResponse (200 )
349
329
job_data_file = data_path ('job_1.vot' )
350
330
job_data = utils .read_file_content (job_data_file )
351
331
response_results_job .set_data (method = 'GET' ,
@@ -474,9 +454,7 @@ def test_xmatch(self):
474
454
tap = GaiaClass (conn_handler , tapplus , show_server_messages = False )
475
455
jobid = '12345'
476
456
# Launch response
477
- response_launch_job = DummyResponse ()
478
- response_launch_job .set_status_code (303 )
479
- response_launch_job .set_message ("OK" )
457
+ response_launch_job = DummyResponse (303 )
480
458
# list of list (httplib implementation for headers in response)
481
459
launch_response_headers = [
482
460
['location' , 'http://test:1111/tap/async/' + jobid ]
@@ -487,19 +465,15 @@ def test_xmatch(self):
487
465
headers = launch_response_headers )
488
466
conn_handler .set_default_response (response_launch_job )
489
467
# Phase response
490
- response_phase = DummyResponse ()
491
- response_phase .set_status_code (200 )
492
- response_phase .set_message ("OK" )
468
+ response_phase = DummyResponse (200 )
493
469
response_phase .set_data (method = 'GET' ,
494
470
context = None ,
495
471
body = "COMPLETED" ,
496
472
headers = None )
497
473
req = "async/" + jobid + "/phase"
498
474
conn_handler .set_response (req , response_phase )
499
475
# Results response
500
- response_results_job = DummyResponse ()
501
- response_results_job .set_status_code (200 )
502
- response_results_job .set_message ("OK" )
476
+ response_results_job = DummyResponse (200 )
503
477
job_data_file = data_path ('job_1.vot' )
504
478
job_data = utils .read_file_content (job_data_file )
505
479
response_results_job .set_data (method = 'GET' ,
0 commit comments