Content-Length: 272408 | pFad | http://github.com/apache/airflow/commit/4dc1778a64f1adac212e97919248d020ed8447de

56 test(hooks/exasol): add test for no resultSet rtn type (#25277) · apache/airflow@4dc1778 · GitHub
Skip to content

Commit 4dc1778

Browse files
authored
test(hooks/exasol): add test for no resultSet rtn type (#25277)
1 parent 8bb0c4f commit 4dc1778

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

tests/providers/exasol/hooks/test_exasol.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,15 @@ def test_run_no_queries(self):
137137
self.db_hook.run(sql=[])
138138
assert err.value.args[0] == "List of SQL statements is empty"
139139

140+
def test_no_result_set(self):
141+
"""Queries like DROP and SELECT are of type rowCount (not resultSet),
142+
which raises an error in pyexasol if trying to iterate over them"""
143+
self.cur.result_type = mock.Mock()
144+
self.cur.result_type.return_value = 'rowCount'
145+
146+
sql = 'SQL'
147+
self.db_hook.run(sql)
148+
140149
def test_bulk_load(self):
141150
with pytest.raises(NotImplementedError):
142151
self.db_hook.bulk_load('table', '/tmp/file')

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/apache/airflow/commit/4dc1778a64f1adac212e97919248d020ed8447de

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy