@@ -41,10 +41,50 @@ def data_path(filename):
41
41
42
42
class TestTap :
43
43
44
+ def test_show_message (self ):
45
+ connHandler = DummyConnHandler ()
46
+
47
+ dummy_response = DummyResponse ()
48
+ dummy_response .set_status_code (200 )
49
+ dummy_response .set_message ("OK" )
50
+
51
+ message_text = "1653401204784D[type: -100,-1]=Gaia dev is under maintenance"
52
+
53
+ dummy_response .set_data (method = 'GET' ,
54
+ context = None ,
55
+ body = message_text ,
56
+ headers = None )
57
+ connHandler .set_default_response (dummy_response )
58
+
59
+ # show_messages
60
+ tableRequest = 'notification?action=GetNotifications'
61
+ connHandler .set_response (tableRequest , dummy_response )
62
+
63
+ tapplus = TapPlus ("http://test:1111/tap" , connhandler = connHandler )
64
+ tap = GaiaClass (connHandler , tapplus , show_messages = True )
65
+
44
66
def test_query_object (self ):
45
67
conn_handler = DummyConnHandler ()
68
+ # Launch response: we use default response because the query contains
69
+ # decimals
70
+ dummy_response = DummyResponse ()
71
+ dummy_response .set_status_code (200 )
72
+ dummy_response .set_message ("OK" )
73
+
74
+ message_text = "1653401204784D[type: -100,-1]=Gaia dev is under maintenance"
75
+
76
+ dummy_response .set_data (method = 'GET' ,
77
+ context = None ,
78
+ body = message_text ,
79
+ headers = None )
80
+ conn_handler .set_default_response (dummy_response )
81
+
82
+ # show_messages
83
+ tableRequest = 'notification?action=GetNotifications'
84
+ conn_handler .set_response (tableRequest , dummy_response )
85
+
46
86
tapplus = TapPlus ("http://test:1111/tap" , connhandler = conn_handler )
47
- tap = GaiaClass (conn_handler , tapplus , show_messages = False )
87
+ tap = GaiaClass (conn_handler , tapplus , show_messages = True )
48
88
# Launch response: we use default response because the query contains
49
89
# decimals
50
90
response_launch_job = DummyResponse ()
@@ -395,7 +435,7 @@ def test_load_data(self):
395
435
output_file = os .path .abspath (path_to_end_with )
396
436
397
437
params_dict = {}
398
- params_dict ['VALID_DATA' ] = "false "
438
+ params_dict ['VALID_DATA' ] = "true "
399
439
params_dict ['ID' ] = ids
400
440
params_dict ['FORMAT' ] = str (format )
401
441
params_dict ['RETRIEVAL_TYPE' ] = str (retrieval_type )
0 commit comments