You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by ds...@apache.org on 2021/12/06 19:34:29 UTC

[airflow] branch main updated: Fix trino hook tests: change int to enum (#20082)

This is an automated email from the ASF dual-hosted git repository.

dstandish pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/main by this push:
     new 50d866a  Fix trino hook tests: change int to enum (#20082)
50d866a is described below

commit 50d866a5541e1fcc4ff1ceeab172cccc31af7e46
Author: Daniel Standish <15...@users.noreply.github.com>
AuthorDate: Mon Dec 6 11:33:59 2021 -0800

    Fix trino hook tests: change int to enum (#20082)
    
    Trino hook tests were failing because the mock assert method now appears to use an Enum instead of int.
---
 tests/providers/trino/hooks/test_trino.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/providers/trino/hooks/test_trino.py b/tests/providers/trino/hooks/test_trino.py
index ac7a6d1..f17d741 100644
--- a/tests/providers/trino/hooks/test_trino.py
+++ b/tests/providers/trino/hooks/test_trino.py
@@ -36,7 +36,7 @@ KERBEROS_AUTHENTICATION = 'airflow.providers.trino.hooks.trino.trino.auth.Kerber
 TRINO_DBAPI_CONNECT = 'airflow.providers.trino.hooks.trino.trino.dbapi.connect'
 
 
-class TestTrinoHookConn(unittest.TestCase):
+class TestTrinoHookConn:
     @patch(BASIC_AUTHENTICATION)
     @patch(TRINO_DBAPI_CONNECT)
     @patch(HOOK_GET_CONNECTION)
@@ -117,7 +117,7 @@ class TestTrinoHookConn(unittest.TestCase):
             schema='hive',
             source='airflow',
             user='login',
-            isolation_level=0,
+            isolation_level=IsolationLevel.AUTOCOMMIT,
             auth=None if not auth else auth.return_value,
             verify=verify,
         )