mirror of
https://github.com/apache/superset.git
synced 2026-04-20 00:24:38 +00:00
Enable running of tests in tests/db_engine_specs (#8902)
* Enable running of tests in tests/db_engine_specs * Resolve application context errors * Refactor and add tests for pyodbc.Row conversion * Appease isort, regardless of isort:skip
This commit is contained in:
committed by
Ville Brofeldt
parent
5b690f9411
commit
8fc814fc62
@@ -63,9 +63,8 @@ class MssqlEngineSpec(BaseEngineSpec):
|
||||
@classmethod
|
||||
def fetch_data(cls, cursor, limit: int) -> List[Tuple]:
|
||||
data = super().fetch_data(cursor, limit)
|
||||
if data and type(data[0]).__name__ == "Row":
|
||||
data = [tuple(row) for row in data]
|
||||
return data
|
||||
# Lists of `pyodbc.Row` need to be unpacked further
|
||||
return cls.pyodbc_rows_to_tuples(data)
|
||||
|
||||
column_types = [
|
||||
(String(), re.compile(r"^(?<!N)((VAR){0,1}CHAR|TEXT|STRING)", re.IGNORECASE)),
|
||||
|
||||
Reference in New Issue
Block a user