dungdm93 commented on code in PR #24311: URL: https://github.com/apache/airflow/pull/24311#discussion_r894940070
########## tests/providers/google/cloud/transfers/test_oracle_to_gcs.py: ########## @@ -19,7 +19,7 @@ import unittest from unittest import mock -import cx_Oracle +import oracledb.base_impl as oracledbbase Review Comment: Should import `oracledb` as well ########## tests/providers/oracle/hooks/test_oracle.py: ########## @@ -158,12 +158,12 @@ def test_get_conn_events(self, mock_connect): assert args == () assert kwargs['events'] is True - @mock.patch('airflow.providers.oracle.hooks.oracle.cx_Oracle.connect') + @mock.patch('airflow.providers.oracle.hooks.oracle.oracledb.connect') def test_get_conn_purity(self, mock_connect): purity = { - 'new': cx_Oracle.ATTR_PURITY_NEW, - 'self': cx_Oracle.ATTR_PURITY_SELF, - 'default': cx_Oracle.ATTR_PURITY_DEFAULT, + 'new': oracledb.ATTR_PURITY_NEW, + 'self': oracledb.ATTR_PURITY_SELF, + 'default': oracledb.ATTR_PURITY_DEFAULT, Review Comment: Should be `oracledb.PURITY_*` as well ########## tests/providers/oracle/hooks/test_oracle.py: ########## @@ -119,15 +119,15 @@ def test_get_conn_nencoding(self, mock_connect): assert 'encoding' not in kwargs assert kwargs['nencoding'] == 'UTF-8' - @mock.patch('airflow.providers.oracle.hooks.oracle.cx_Oracle.connect') + @mock.patch('airflow.providers.oracle.hooks.oracle.oracledb.connect') def test_get_conn_mode(self, mock_connect): mode = { - 'sysdba': cx_Oracle.SYSDBA, - 'sysasm': cx_Oracle.SYSASM, - 'sysoper': cx_Oracle.SYSOPER, - 'sysbkp': cx_Oracle.SYSBKP, - 'sysdgd': cx_Oracle.SYSDGD, - 'syskmt': cx_Oracle.SYSKMT, + 'sysdba': oracledb.SYSDBA, + 'sysasm': oracledb.SYSASM, + 'sysoper': oracledb.SYSOPER, + 'sysbkp': oracledb.SYSBKP, + 'sysdgd': oracledb.SYSDGD, + 'syskmt': oracledb.SYSKMT, Review Comment: Should using `oracledb.AUTH_MODE_*` as well -- 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: commits-unsubscr...@airflow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org