Skip to content

Commit 6193268

Browse files
committed
fix: Conditionally import FSHook
1 parent 1518a9e commit 6193268

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

tests/hooks/dbt/test_dbt_hook_base.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
from airflow_dbt_python.hooks.fs.local import DbtLocalFsHook
1313
from airflow_dbt_python.hooks.target import DbtConnectionHook, DbtPostgresHook
1414
from airflow_dbt_python.utils.configs import RunTaskConfig
15+
from airflow_dbt_python.utils.version import AIRFLOW_V_3_0_PLUS
1516

1617
condition = False
1718
try:
@@ -48,7 +49,10 @@ def test_dbt_hook_get_s3_remote():
4849

4950
def test_dbt_hook_get_local_fs_remote():
5051
"""Test the correct remote is procured."""
51-
from airflow.hooks.filesystem import FSHook
52+
if AIRFLOW_V_3_0_PLUS:
53+
from airflow.providers.standard.hooks.filesystem import FSHook
54+
else:
55+
from airflow.hooks.filesystem import FSHook # type: ignore
5256

5357
hook = DbtHook()
5458

0 commit comments

Comments
 (0)