Skip to content

Commit 30abe0e

Browse files
Andrii ChubatiukAndrewChubatiuk
authored andcommitted
fixed tests for athena
1 parent e75a67a commit 30abe0e

File tree

1 file changed

+15
-4
lines changed

1 file changed

+15
-4
lines changed

tests/query_runner/test_athena.py

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ def test_external_table(self):
7676
)
7777
with self.stubber:
7878
assert query_runner.get_schema() == [
79-
{"columns": ["row_id"], "name": "test1.jdbc_table", "description": None}
79+
{"columns": [{"name": "row_id", "type": "int"}], "name": "test1.jdbc_table", "description": None}
8080
]
8181

8282
def test_partitioned_table(self):
@@ -127,7 +127,14 @@ def test_partitioned_table(self):
127127
)
128128
with self.stubber:
129129
assert query_runner.get_schema() == [
130-
{"columns": ["sk", "category"], "name": "test1.partitioned_table", "description": None}
130+
{
131+
"columns": [
132+
{"name": "sk", "type": "partition (int)"},
133+
{"name": "category", "type": "partition", "idx": 0},
134+
],
135+
"name": "test1.partitioned_table",
136+
"description": None,
137+
}
131138
]
132139

133140
def test_view(self):
@@ -160,7 +167,9 @@ def test_view(self):
160167
{"DatabaseName": "test1"},
161168
)
162169
with self.stubber:
163-
assert query_runner.get_schema() == [{"columns": ["sk"], "name": "test1.view", "description": None}]
170+
assert query_runner.get_schema() == [
171+
{"columns": [{"name": "sk", "type": "int"}], "name": "test1.view", "description": None}
172+
]
164173

165174
def test_dodgy_table_does_not_break_schema_listing(self):
166175
"""
@@ -200,7 +209,9 @@ def test_dodgy_table_does_not_break_schema_listing(self):
200209
{"DatabaseName": "test1"},
201210
)
202211
with self.stubber:
203-
assert query_runner.get_schema() == [{"columns": ["region"], "name": "test1.csv", "description": None}]
212+
assert query_runner.get_schema() == [
213+
{"columns": [{"name": "region", "type": "string"}], "name": "test1.csv", "description": None}
214+
]
204215

205216
def test_no_storage_descriptor_table(self):
206217
"""

0 commit comments

Comments
 (0)