Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions tests/providers/exasol/hooks/test_exasol.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,15 @@ def test_run_no_queries(self):
self.db_hook.run(sql=[])
assert err.value.args[0] == "List of SQL statements is empty"

def test_no_result_set(self):
"""Queries like DROP and SELECT are of type rowCount (not resultSet),
which raises an error in pyexasol if trying to iterate over them"""
self.cur.result_type = mock.Mock()
self.cur.result_type.return_value = 'rowCount'

sql = 'SQL'
self.db_hook.run(sql)

def test_bulk_load(self):
with pytest.raises(NotImplementedError):
self.db_hook.bulk_load('table', '/tmp/file')
Expand Down