Skip to content

Commit c770d2c

Browse files
committed
fixed tests
1 parent 01466d2 commit c770d2c

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

tests/pystackql_tests.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -207,8 +207,8 @@ def test_12_execute_with_pandas_output(self):
207207
self.assertTrue(is_valid_dataframe, f"Result is not a valid DataFrame: {result}")
208208
# Check datatypes of the columns
209209
expected_dtypes = {
210-
'year': 'int64',
211-
'num_buckets': 'int64'
210+
'instance_type': 'str',
211+
'num_instances': 'int64'
212212
}
213213
for col, expected_dtype in expected_dtypes.items():
214214
actual_dtype = result[col].dtype
@@ -286,8 +286,8 @@ def test_22_execute_server_mode_pandas_output(self):
286286
self.assertTrue(is_valid_dataframe, f"Result is not a valid DataFrame: {result}")
287287
# Check datatypes of the columns
288288
expected_dtypes = {
289-
'year': 'int64',
290-
'num_buckets': 'int64'
289+
'instance_type': 'str',
290+
'num_instances': 'int64'
291291
}
292292
for col, expected_dtype in expected_dtypes.items():
293293
actual_dtype = result[col].dtype

tests/test_params.py

+6-4
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,12 @@ def registry_pull_resp_pattern(provider):
4242
"""
4343

4444
aws_query = f"""
45-
SELECT
46-
SPLIT_PART(CreationDate, '-', 1) as year, count(*) as num_buckets FROM aws.s3_api.buckets
47-
WHERE region = 'us-east-1'
48-
GROUP BY year
45+
SELECT
46+
instance_type,
47+
count(*) as num_instances
48+
FROM aws.ec2.instances
49+
WHERE region = 'ap-southeast-2'
50+
GROUP BY instance_type
4951
"""
5052

5153
regions = os.environ.get('AWS_REGIONS').split(',')

0 commit comments

Comments
 (0)