utkarsharma2 commented on code in PR #32319: URL: https://github.com/apache/airflow/pull/32319#discussion_r1251604927
########## tests/providers/odbc/hooks/test_odbc.py: ########## @@ -19,31 +19,55 @@ import json import logging +from collections import namedtuple from unittest import mock from unittest.mock import patch from urllib.parse import quote_plus, urlsplit import pyodbc +import pytest from airflow.models import Connection from airflow.providers.odbc.hooks.odbc import OdbcHook [email protected] +def Row(): + """ + Use namedtuple instead of pyodbc.Row, because Row objects can only be + created from C API of pyodbc. + """ + return namedtuple("Row", ["id", "value"]) + + class TestOdbcHook: def get_hook(self=None, hook_params=None, conn_params=None): hook_params = hook_params or {} conn_params = conn_params or {} + Review Comment: ```suggestion ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
