@@ -202,12 +202,17 @@ def test_11a_execute_with_defaults_null_response(self):
202
202
203
203
@pystackql_test_setup (output = 'pandas' )
204
204
def test_12_execute_with_pandas_output (self ):
205
- result = self .stackql .execute (aws_query )
205
+ # result = self.stackql.execute(aws_query)
206
+ result = self .stackql .execute (google_query )
206
207
is_valid_dataframe = isinstance (result , pd .DataFrame )
207
208
self .assertTrue (is_valid_dataframe , f"Result is not a valid DataFrame: { result } " )
208
209
# Check datatypes of the columns
210
+ # expected_dtypes = {
211
+ # 'instance_type': 'object',
212
+ # 'num_instances': 'int64'
213
+ # }
209
214
expected_dtypes = {
210
- 'instance_type ' : 'str ' ,
215
+ 'status ' : 'object ' ,
211
216
'num_instances' : 'int64'
212
217
}
213
218
for col , expected_dtype in expected_dtypes .items ():
@@ -281,14 +286,19 @@ def test_21_execute_server_mode_default_output(self):
281
286
282
287
@pystackql_test_setup (server_mode = True , output = 'pandas' )
283
288
def test_22_execute_server_mode_pandas_output (self ):
284
- result = self .stackql .execute (aws_query )
289
+ # result = self.stackql.execute(aws_query)
290
+ result = self .stackql .execute (google_query )
285
291
is_valid_dataframe = isinstance (result , pd .DataFrame )
286
292
self .assertTrue (is_valid_dataframe , f"Result is not a valid DataFrame: { result } " )
287
293
# Check datatypes of the columns
294
+ # expected_dtypes = {
295
+ # 'instance_type': 'object',
296
+ # 'num_instances': 'int64'
297
+ # }
288
298
expected_dtypes = {
289
- 'instance_type ' : 'str ' ,
299
+ 'status ' : 'object ' ,
290
300
'num_instances' : 'int64'
291
- }
301
+ }
292
302
for col , expected_dtype in expected_dtypes .items ():
293
303
actual_dtype = result [col ].dtype
294
304
self .assertEqual (actual_dtype , expected_dtype , f"Column '{ col } ' has dtype '{ actual_dtype } ' but expected '{ expected_dtype } '" )
0 commit comments