diff --git a/.dockerignore b/.dockerignore index 2d70030fd886b..e913ed4f43c89 100644 --- a/.dockerignore +++ b/.dockerignore @@ -42,6 +42,7 @@ # Add tests and kubernetes_tests to context. !tests +!tests_common !kubernetes_tests !helm_tests !docker_tests diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a2f42e65192bf..fe4315fafc212 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -364,7 +364,7 @@ repos: args: [] require_serial: true additional_dependencies: ["ruff==0.5.5"] - exclude: ^.*/.*_vendor/|^tests/dags/test_imports.py|^airflow/contrib/ + exclude: ^.*/.*_vendor/|^tests/dags/test_imports.py$ - id: replace-bad-characters name: Replace bad characters entry: ./scripts/ci/pre_commit/replace_bad_characters.py @@ -736,7 +736,7 @@ repos: name: Verify usage of Airflow deprecation classes in core entry: category=DeprecationWarning|category=PendingDeprecationWarning files: \.py$ - exclude: ^airflow/configuration\.py$|^providers/src/airflow/providers/|^scripts/in_container/verify_providers\.py$|^(providers/)?tests/.*$|^dev/tests_common/ + exclude: ^airflow/configuration\.py$|^providers/src/airflow/providers/|^scripts/in_container/verify_providers\.py$|^(providers/)?tests/.*$|^tests_common/ pass_filenames: true - id: check-provide-create-sessions-imports language: pygrep @@ -1184,7 +1184,9 @@ repos: ^(providers/)?tests/ | ^dev/.*\.py$ | ^scripts/.*\.py$ | - ^\w+_tests/ | + ^docker_tests/.*$ | + ^helm_tests/.*$ | + ^tests_common/.*$ | ^docs/.*\.py$ | ^hatch_build.py$ - id: check-provider-docs-valid diff --git a/Dockerfile.ci b/Dockerfile.ci index df1cdf8c27385..0cdf9899799f3 100644 --- a/Dockerfile.ci +++ b/Dockerfile.ci @@ -1369,6 +1369,7 @@ COPY pyproject.toml ${AIRFLOW_SOURCES}/pyproject.toml COPY providers/pyproject.toml ${AIRFLOW_SOURCES}/providers/pyproject.toml COPY task_sdk/pyproject.toml ${AIRFLOW_SOURCES}/task_sdk/pyproject.toml COPY airflow/__init__.py ${AIRFLOW_SOURCES}/airflow/ +COPY tests_common/ ${AIRFLOW_SOURCES}/tests_common/ COPY generated/* ${AIRFLOW_SOURCES}/generated/ COPY constraints/* ${AIRFLOW_SOURCES}/constraints/ COPY LICENSE ${AIRFLOW_SOURCES}/LICENSE diff --git a/contributing-docs/testing/system_tests.rst b/contributing-docs/testing/system_tests.rst index cc64d25e90cbc..fe010f76bd5d5 100644 --- a/contributing-docs/testing/system_tests.rst +++ b/contributing-docs/testing/system_tests.rst @@ -35,7 +35,7 @@ Airflow system tests are pretty special because they serve three purposes: Old System Tests ---------------- -The system tests derive from the ``dev.tests_common.test_utils.system_test_class.SystemTests`` class. +The system tests derive from the ``tests_common.test_utils.system_test_class.SystemTests`` class. Old versions of System tests should also be marked with ``@pytest.marker.system(SYSTEM)`` where ``system`` designates the system to be tested (for example, ``google.cloud``). These tests are skipped by default. diff --git a/contributing-docs/testing/unit_tests.rst b/contributing-docs/testing/unit_tests.rst index 468f10b68d4c5..dc4e27f10d9fe 100644 --- a/contributing-docs/testing/unit_tests.rst +++ b/contributing-docs/testing/unit_tests.rst @@ -1171,7 +1171,7 @@ are not part of the public API. We deal with it in one of the following ways: 1) If the whole provider is supposed to only work for later airflow version, we remove the whole provider by excluding it from compatibility test configuration (see below) -2) Some compatibility shims are defined in ``dev.tests_common.test_utils/compat.py`` - and they can be used to make the +2) Some compatibility shims are defined in ``tests_common.test_utils/compat.py`` - and they can be used to make the tests compatible - for example importing ``ParseImportError`` after the exception has been renamed from ``ImportError`` and it would fail in Airflow 2.9, but we have a fallback import in ``compat.py`` that falls back to old import automatically, so all tests testing / expecting ``ParseImportError`` should import @@ -1184,7 +1184,7 @@ are not part of the public API. We deal with it in one of the following ways: .. code-block:: python - from dev.tests_common.test_utils.compat import AIRFLOW_V_2_8_PLUS + from tests_common.test_utils.compat import AIRFLOW_V_2_8_PLUS @pytest.mark.skipif(not AIRFLOW_V_2_8_PLUS, reason="The tests should be skipped for Airflow < 2.8") @@ -1197,7 +1197,7 @@ are not part of the public API. We deal with it in one of the following ways: .. code-block:: python - from dev.tests_common import RUNNING_TESTS_AGAINST_AIRFLOW_PACKAGES + from tests_common import RUNNING_TESTS_AGAINST_AIRFLOW_PACKAGES @pytest.mark.skipif( diff --git a/dev/breeze/src/airflow_breeze/utils/docker_command_utils.py b/dev/breeze/src/airflow_breeze/utils/docker_command_utils.py index 164a1583e1fea..2352bcda533a2 100644 --- a/dev/breeze/src/airflow_breeze/utils/docker_command_utils.py +++ b/dev/breeze/src/airflow_breeze/utils/docker_command_utils.py @@ -97,6 +97,7 @@ ("pyproject.toml", "/opt/airflow/pyproject.toml"), ("scripts", "/opt/airflow/scripts"), ("scripts/docker/entrypoint_ci.sh", "/entrypoint"), + ("tests_common", "/opt/airflow/tests_common"), ("tests", "/opt/airflow/tests"), ("helm_tests", "/opt/airflow/helm_tests"), ("kubernetes_tests", "/opt/airflow/kubernetes_tests"), diff --git a/dev/breeze/src/airflow_breeze/utils/selective_checks.py b/dev/breeze/src/airflow_breeze/utils/selective_checks.py index cf4e124ff94e3..74a856f3693c6 100644 --- a/dev/breeze/src/airflow_breeze/utils/selective_checks.py +++ b/dev/breeze/src/airflow_breeze/utils/selective_checks.py @@ -245,7 +245,7 @@ def __hash__(self): ], FileGroupForCi.TESTS_UTILS_FILES: [ r"^tests/utils/", - r"^dev/tests_common/.*\.py$", + r"^tests_common/.*\.py$", ], FileGroupForCi.TASK_SDK_FILES: [ r"^task_sdk/src/airflow/sdk/.*\.py$", diff --git a/dev/breeze/tests/test_selective_checks.py b/dev/breeze/tests/test_selective_checks.py index 619dc8eec2f99..ec0769c0a87fe 100644 --- a/dev/breeze/tests/test_selective_checks.py +++ b/dev/breeze/tests/test_selective_checks.py @@ -778,7 +778,7 @@ def assert_outputs_are_printed(expected_outputs: dict[str, str], stderr: str): ), ( pytest.param( - ("dev/tests_common/__init__.py",), + ("tests_common/__init__.py",), { "affected-providers-list-as-string": ALL_PROVIDERS_AFFECTED, "all-python-versions": "['3.9']", @@ -799,7 +799,7 @@ def assert_outputs_are_printed(expected_outputs: dict[str, str], stderr: str): "needs-mypy": "true", "mypy-folders": "['airflow', 'providers', 'docs', 'dev']", }, - id="All tests should be run when dev/tests_common/ change", + id="All tests should be run when tests_common/ change", ) ), ], diff --git a/dev/perf/scheduler_dag_execution_timing.py b/dev/perf/scheduler_dag_execution_timing.py index fc5c21bda7aa7..1956c8023b5f0 100755 --- a/dev/perf/scheduler_dag_execution_timing.py +++ b/dev/perf/scheduler_dag_execution_timing.py @@ -107,7 +107,7 @@ def get_executor_under_test(dotted_path): from airflow.executors.executor_loader import ExecutorLoader if dotted_path == "MockExecutor": - from dev.tests_common.test_utils.mock_executor import MockExecutor as executor + from tests_common.test_utils.mock_executor import MockExecutor as executor else: executor = ExecutorLoader.load_executor(dotted_path) diff --git a/helm_tests/airflow_aux/test_pod_template_file.py b/helm_tests/airflow_aux/test_pod_template_file.py index 8c6c8c21f9805..5a507b7ee6aae 100644 --- a/helm_tests/airflow_aux/test_pod_template_file.py +++ b/helm_tests/airflow_aux/test_pod_template_file.py @@ -24,6 +24,7 @@ import pytest from helm_tests.airflow_aux.test_container_lifecycle import CONTAINER_LIFECYCLE_PARAMETERS + from tests.charts.helm_template_generator import render_chart diff --git a/providers/tests/alibaba/cloud/log/test_oss_task_handler.py b/providers/tests/alibaba/cloud/log/test_oss_task_handler.py index 18abe57aa09b7..ff65dd89ce4ef 100644 --- a/providers/tests/alibaba/cloud/log/test_oss_task_handler.py +++ b/providers/tests/alibaba/cloud/log/test_oss_task_handler.py @@ -22,14 +22,13 @@ from unittest.mock import PropertyMock import pytest +from tests_common.test_utils.config import conf_vars +from tests_common.test_utils.db import clear_db_dags, clear_db_runs from airflow.providers.alibaba.cloud.log.oss_task_handler import OSSTaskHandler from airflow.utils.state import TaskInstanceState from airflow.utils.timezone import datetime -from dev.tests_common.test_utils.config import conf_vars -from dev.tests_common.test_utils.db import clear_db_dags, clear_db_runs - pytestmark = pytest.mark.db_test OSS_TASK_HANDLER_STRING = "airflow.providers.alibaba.cloud.log.oss_task_handler.{}" diff --git a/providers/tests/amazon/aws/auth_manager/avp/test_facade.py b/providers/tests/amazon/aws/auth_manager/avp/test_facade.py index 3d2a0195039df..af1149aec45fd 100644 --- a/providers/tests/amazon/aws/auth_manager/avp/test_facade.py +++ b/providers/tests/amazon/aws/auth_manager/avp/test_facade.py @@ -21,6 +21,7 @@ from unittest.mock import Mock import pytest +from tests_common.test_utils.config import conf_vars from airflow.exceptions import AirflowException from airflow.providers.amazon.aws.auth_manager.avp.entities import AvpEntities, get_action_id, get_entity_type @@ -28,8 +29,6 @@ from airflow.providers.amazon.aws.auth_manager.user import AwsAuthManagerUser from airflow.utils.helpers import prune_dict -from dev.tests_common.test_utils.config import conf_vars - if TYPE_CHECKING: from airflow.auth.managers.base_auth_manager import ResourceMethod diff --git a/providers/tests/amazon/aws/auth_manager/cli/test_avp_commands.py b/providers/tests/amazon/aws/auth_manager/cli/test_avp_commands.py index 6122079fee4cb..c523beec564c7 100644 --- a/providers/tests/amazon/aws/auth_manager/cli/test_avp_commands.py +++ b/providers/tests/amazon/aws/auth_manager/cli/test_avp_commands.py @@ -20,13 +20,12 @@ from unittest.mock import ANY, Mock, patch import pytest +from tests_common.test_utils.compat import AIRFLOW_V_2_8_PLUS +from tests_common.test_utils.config import conf_vars from airflow.cli import cli_parser from airflow.providers.amazon.aws.auth_manager.cli.avp_commands import init_avp, update_schema -from dev.tests_common.test_utils.compat import AIRFLOW_V_2_8_PLUS -from dev.tests_common.test_utils.config import conf_vars - mock_boto3 = Mock() pytestmark = [ diff --git a/providers/tests/amazon/aws/auth_manager/security_manager/test_aws_security_manager_override.py b/providers/tests/amazon/aws/auth_manager/security_manager/test_aws_security_manager_override.py index b6071aac955c6..1c57bc14d83ed 100644 --- a/providers/tests/amazon/aws/auth_manager/security_manager/test_aws_security_manager_override.py +++ b/providers/tests/amazon/aws/auth_manager/security_manager/test_aws_security_manager_override.py @@ -20,8 +20,7 @@ import pytest from flask import Flask - -from dev.tests_common.test_utils.compat import ignore_provider_compatibility_error +from tests_common.test_utils.compat import ignore_provider_compatibility_error python3_saml = pytest.importorskip("python3-saml") diff --git a/providers/tests/amazon/aws/auth_manager/test_aws_auth_manager.py b/providers/tests/amazon/aws/auth_manager/test_aws_auth_manager.py index 47e8a4cbcb26d..ba93b2105a81e 100644 --- a/providers/tests/amazon/aws/auth_manager/test_aws_auth_manager.py +++ b/providers/tests/amazon/aws/auth_manager/test_aws_auth_manager.py @@ -22,6 +22,9 @@ import pytest from flask import Flask, session from flask_appbuilder.menu import MenuItem +from tests_common.test_utils.compat import AIRFLOW_V_2_8_PLUS, AIRFLOW_V_2_9_PLUS +from tests_common.test_utils.config import conf_vars +from tests_common.test_utils.www import check_content_in_response from airflow.providers.amazon.aws.auth_manager.avp.entities import AvpEntities from airflow.providers.amazon.aws.auth_manager.avp.facade import AwsAuthManagerAmazonVerifiedPermissionsFacade @@ -39,10 +42,6 @@ from airflow.www import app as application from airflow.www.extensions.init_appbuilder import init_appbuilder -from dev.tests_common.test_utils.compat import AIRFLOW_V_2_8_PLUS, AIRFLOW_V_2_9_PLUS -from dev.tests_common.test_utils.config import conf_vars -from dev.tests_common.test_utils.www import check_content_in_response - try: from airflow.auth.managers.models.resource_details import ( AccessView, diff --git a/providers/tests/amazon/aws/auth_manager/views/test_auth.py b/providers/tests/amazon/aws/auth_manager/views/test_auth.py index 9b2eec69188be..919eb59ead059 100644 --- a/providers/tests/amazon/aws/auth_manager/views/test_auth.py +++ b/providers/tests/amazon/aws/auth_manager/views/test_auth.py @@ -20,13 +20,12 @@ import pytest from flask import session, url_for +from tests_common.test_utils.compat import AIRFLOW_V_2_9_PLUS +from tests_common.test_utils.config import conf_vars from airflow.exceptions import AirflowException from airflow.www import app as application -from dev.tests_common.test_utils.compat import AIRFLOW_V_2_9_PLUS -from dev.tests_common.test_utils.config import conf_vars - pytestmark = [ pytest.mark.skipif(not AIRFLOW_V_2_9_PLUS, reason="Test requires Airflow 2.9+"), pytest.mark.skip_if_database_isolation_mode, diff --git a/providers/tests/amazon/aws/executors/batch/test_batch_executor.py b/providers/tests/amazon/aws/executors/batch/test_batch_executor.py index e7037bd16c85e..85272186b3324 100644 --- a/providers/tests/amazon/aws/executors/batch/test_batch_executor.py +++ b/providers/tests/amazon/aws/executors/batch/test_batch_executor.py @@ -26,6 +26,8 @@ import yaml from botocore.exceptions import ClientError, NoCredentialsError from semver import VersionInfo +from tests_common import RUNNING_TESTS_AGAINST_AIRFLOW_PACKAGES +from tests_common.test_utils.config import conf_vars from airflow.exceptions import AirflowException from airflow.executors.base_executor import BaseExecutor @@ -46,9 +48,6 @@ from airflow.utils.state import State from airflow.version import version as airflow_version_str -from dev.tests_common import RUNNING_TESTS_AGAINST_AIRFLOW_PACKAGES -from dev.tests_common.test_utils.config import conf_vars - airflow_version = VersionInfo(*map(int, airflow_version_str.split(".")[:3])) ARN1 = "arn1" diff --git a/providers/tests/amazon/aws/executors/ecs/test_ecs_executor.py b/providers/tests/amazon/aws/executors/ecs/test_ecs_executor.py index 50cdb580382f3..80b7d85a9eded 100644 --- a/providers/tests/amazon/aws/executors/ecs/test_ecs_executor.py +++ b/providers/tests/amazon/aws/executors/ecs/test_ecs_executor.py @@ -32,6 +32,9 @@ from botocore.exceptions import ClientError from inflection import camelize from semver import VersionInfo +from tests_common import RUNNING_TESTS_AGAINST_AIRFLOW_PACKAGES +from tests_common.test_utils.compat import AIRFLOW_V_2_10_PLUS +from tests_common.test_utils.config import conf_vars from airflow.exceptions import AirflowException from airflow.executors.base_executor import BaseExecutor @@ -57,10 +60,6 @@ from airflow.utils.timezone import utcnow from airflow.version import version as airflow_version_str -from dev.tests_common import RUNNING_TESTS_AGAINST_AIRFLOW_PACKAGES -from dev.tests_common.test_utils.compat import AIRFLOW_V_2_10_PLUS -from dev.tests_common.test_utils.config import conf_vars - pytestmark = pytest.mark.db_test airflow_version = VersionInfo(*map(int, airflow_version_str.split(".")[:3])) diff --git a/providers/tests/amazon/aws/hooks/test_base_aws.py b/providers/tests/amazon/aws/hooks/test_base_aws.py index c58993d748f2d..8919203da0f01 100644 --- a/providers/tests/amazon/aws/hooks/test_base_aws.py +++ b/providers/tests/amazon/aws/hooks/test_base_aws.py @@ -38,6 +38,7 @@ from botocore.utils import FileWebIdentityTokenLoader from moto import mock_aws from moto.core import DEFAULT_ACCOUNT_ID +from tests_common.test_utils.config import conf_vars from airflow.exceptions import AirflowException from airflow.models.connection import Connection @@ -50,8 +51,6 @@ ) from airflow.providers.amazon.aws.utils.connection_wrapper import AwsConnectionWrapper -from dev.tests_common.test_utils.config import conf_vars - pytest.importorskip("aiobotocore") MOCK_AWS_CONN_ID = "mock-conn-id" diff --git a/providers/tests/amazon/aws/hooks/test_s3.py b/providers/tests/amazon/aws/hooks/test_s3.py index 2e9a010006bab..89d29dae02dde 100644 --- a/providers/tests/amazon/aws/hooks/test_s3.py +++ b/providers/tests/amazon/aws/hooks/test_s3.py @@ -30,6 +30,7 @@ import pytest from botocore.exceptions import ClientError from moto import mock_aws +from tests_common.test_utils.compat import AIRFLOW_V_2_10_PLUS from airflow.exceptions import AirflowException from airflow.models import Connection @@ -43,8 +44,6 @@ ) from airflow.utils.timezone import datetime -from dev.tests_common.test_utils.compat import AIRFLOW_V_2_10_PLUS - @pytest.fixture def mocked_s3_res(): diff --git a/providers/tests/amazon/aws/links/test_base_aws.py b/providers/tests/amazon/aws/links/test_base_aws.py index 78622870806fb..738fb6acc482c 100644 --- a/providers/tests/amazon/aws/links/test_base_aws.py +++ b/providers/tests/amazon/aws/links/test_base_aws.py @@ -21,14 +21,13 @@ from unittest import mock import pytest +from tests_common.test_utils.compat import AIRFLOW_V_3_0_PLUS +from tests_common.test_utils.mock_operators import MockOperator from airflow.models.xcom import XCom from airflow.providers.amazon.aws.links.base_aws import BaseAwsLink from airflow.serialization.serialized_objects import SerializedDAG -from dev.tests_common.test_utils.compat import AIRFLOW_V_3_0_PLUS -from dev.tests_common.test_utils.mock_operators import MockOperator - if TYPE_CHECKING: from airflow.models.taskinstance import TaskInstance diff --git a/providers/tests/amazon/aws/log/test_cloudwatch_task_handler.py b/providers/tests/amazon/aws/log/test_cloudwatch_task_handler.py index c78fab89e197a..d07699d9a7049 100644 --- a/providers/tests/amazon/aws/log/test_cloudwatch_task_handler.py +++ b/providers/tests/amazon/aws/log/test_cloudwatch_task_handler.py @@ -26,6 +26,7 @@ import boto3 import pytest from moto import mock_aws +from tests_common.test_utils.config import conf_vars from watchtower import CloudWatchLogHandler from airflow.models import DAG, DagRun, TaskInstance @@ -36,8 +37,6 @@ from airflow.utils.state import State from airflow.utils.timezone import datetime -from dev.tests_common.test_utils.config import conf_vars - def get_time_str(time_in_milliseconds): dt_time = dt.fromtimestamp(time_in_milliseconds / 1000.0, tz=timezone.utc) diff --git a/providers/tests/amazon/aws/log/test_s3_task_handler.py b/providers/tests/amazon/aws/log/test_s3_task_handler.py index 9819cf95e9cc1..a471bf0075479 100644 --- a/providers/tests/amazon/aws/log/test_s3_task_handler.py +++ b/providers/tests/amazon/aws/log/test_s3_task_handler.py @@ -26,6 +26,7 @@ import pytest from botocore.exceptions import ClientError from moto import mock_aws +from tests_common.test_utils.config import conf_vars from airflow.models import DAG, DagRun, TaskInstance from airflow.operators.empty import EmptyOperator @@ -34,8 +35,6 @@ from airflow.utils.state import State, TaskInstanceState from airflow.utils.timezone import datetime -from dev.tests_common.test_utils.config import conf_vars - @pytest.fixture(autouse=True) def s3mock(): diff --git a/providers/tests/amazon/aws/secrets/test_systems_manager.py b/providers/tests/amazon/aws/secrets/test_systems_manager.py index c1b35a799d3c9..e1c035ab42047 100644 --- a/providers/tests/amazon/aws/secrets/test_systems_manager.py +++ b/providers/tests/amazon/aws/secrets/test_systems_manager.py @@ -21,12 +21,11 @@ import pytest from moto import mock_aws +from tests_common.test_utils.config import conf_vars from airflow.configuration import initialize_secrets_backends from airflow.providers.amazon.aws.secrets.systems_manager import SystemsManagerParameterStoreBackend -from dev.tests_common.test_utils.config import conf_vars - URI_CONNECTION = pytest.param( "postgres://my-login:my-pass@my-host:5432/my-schema?param1=val1¶m2=val2", id="uri-connection" ) diff --git a/providers/tests/amazon/aws/transfers/test_redshift_to_s3.py b/providers/tests/amazon/aws/transfers/test_redshift_to_s3.py index e27ff2d0aa56d..605705a2b663f 100644 --- a/providers/tests/amazon/aws/transfers/test_redshift_to_s3.py +++ b/providers/tests/amazon/aws/transfers/test_redshift_to_s3.py @@ -22,14 +22,13 @@ import pytest from boto3.session import Session +from tests_common.test_utils.asserts import assert_equal_ignore_multiple_spaces from airflow.exceptions import AirflowException from airflow.models.connection import Connection from airflow.providers.amazon.aws.transfers.redshift_to_s3 import RedshiftToS3Operator from airflow.providers.amazon.aws.utils.redshift import build_credentials_block -from dev.tests_common.test_utils.asserts import assert_equal_ignore_multiple_spaces - class TestRedshiftToS3Transfer: @pytest.mark.parametrize("table_as_file_name, expected_s3_key", [[True, "key/table_"], [False, "key"]]) diff --git a/providers/tests/amazon/aws/transfers/test_s3_to_redshift.py b/providers/tests/amazon/aws/transfers/test_s3_to_redshift.py index 6e300791e0935..c9d9ca337d111 100644 --- a/providers/tests/amazon/aws/transfers/test_s3_to_redshift.py +++ b/providers/tests/amazon/aws/transfers/test_s3_to_redshift.py @@ -22,6 +22,7 @@ import pytest from boto3.session import Session +from tests_common.test_utils.asserts import assert_equal_ignore_multiple_spaces from airflow.exceptions import AirflowException from airflow.models.connection import Connection @@ -34,8 +35,6 @@ SchemaDatasetFacetFields, ) -from dev.tests_common.test_utils.asserts import assert_equal_ignore_multiple_spaces - class TestS3ToRedshiftTransfer: @mock.patch("airflow.providers.amazon.aws.hooks.s3.S3Hook.get_connection") diff --git a/providers/tests/amazon/aws/transfers/test_s3_to_sftp.py b/providers/tests/amazon/aws/transfers/test_s3_to_sftp.py index 545398d9666f8..bcab8b2909af3 100644 --- a/providers/tests/amazon/aws/transfers/test_s3_to_sftp.py +++ b/providers/tests/amazon/aws/transfers/test_s3_to_sftp.py @@ -20,6 +20,7 @@ import boto3 import pytest from moto import mock_aws +from tests_common.test_utils.config import conf_vars from airflow.models import DAG from airflow.providers.amazon.aws.hooks.s3 import S3Hook @@ -28,8 +29,6 @@ from airflow.providers.ssh.operators.ssh import SSHOperator from airflow.utils.timezone import datetime -from dev.tests_common.test_utils.config import conf_vars - pytestmark = pytest.mark.db_test diff --git a/providers/tests/amazon/aws/transfers/test_sftp_to_s3.py b/providers/tests/amazon/aws/transfers/test_sftp_to_s3.py index e4afe5c8c1efb..980c8a19daa55 100644 --- a/providers/tests/amazon/aws/transfers/test_sftp_to_s3.py +++ b/providers/tests/amazon/aws/transfers/test_sftp_to_s3.py @@ -20,6 +20,7 @@ import boto3 import pytest from moto import mock_aws +from tests_common.test_utils.config import conf_vars from airflow.models import DAG from airflow.providers.amazon.aws.hooks.s3 import S3Hook @@ -28,8 +29,6 @@ from airflow.providers.ssh.operators.ssh import SSHOperator from airflow.utils.timezone import datetime -from dev.tests_common.test_utils.config import conf_vars - pytestmark = pytest.mark.db_test BUCKET = "test-bucket" diff --git a/providers/tests/apache/hive/hooks/test_hive.py b/providers/tests/apache/hive/hooks/test_hive.py index aee09db28088e..d975ce50fb692 100644 --- a/providers/tests/apache/hive/hooks/test_hive.py +++ b/providers/tests/apache/hive/hooks/test_hive.py @@ -25,6 +25,7 @@ import pandas as pd import pytest from hmsclient import HMSClient +from tests_common.test_utils.asserts import assert_equal_ignore_multiple_spaces from airflow.exceptions import AirflowException from airflow.models.connection import Connection @@ -34,7 +35,6 @@ from airflow.utils import timezone from airflow.utils.operator_helpers import AIRFLOW_VAR_NAME_FORMAT_MAPPING -from dev.tests_common.test_utils.asserts import assert_equal_ignore_multiple_spaces from providers.tests.apache.hive import ( BaseMockConnectionCursor, InvalidHiveCliHook, diff --git a/providers/tests/apache/livy/hooks/test_livy.py b/providers/tests/apache/livy/hooks/test_livy.py index 0fca347b06a99..d2968591f90f4 100644 --- a/providers/tests/apache/livy/hooks/test_livy.py +++ b/providers/tests/apache/livy/hooks/test_livy.py @@ -25,14 +25,13 @@ import requests from aiohttp import ClientResponseError, RequestInfo from requests.exceptions import RequestException +from tests_common.test_utils.db import clear_db_connections from airflow.exceptions import AirflowException from airflow.models import Connection from airflow.providers.apache.livy.hooks.livy import BatchState, LivyAsyncHook, LivyHook from airflow.utils import db -from dev.tests_common.test_utils.db import clear_db_connections - pytestmark = pytest.mark.skip_if_database_isolation_mode LIVY_CONN_ID = LivyHook.default_conn_name diff --git a/providers/tests/apache/spark/hooks/test_spark_sql.py b/providers/tests/apache/spark/hooks/test_spark_sql.py index 10f63cce99326..179e75ffc7470 100644 --- a/providers/tests/apache/spark/hooks/test_spark_sql.py +++ b/providers/tests/apache/spark/hooks/test_spark_sql.py @@ -22,14 +22,13 @@ from unittest.mock import call, patch import pytest +from tests_common.test_utils.db import clear_db_connections from airflow.exceptions import AirflowException from airflow.models import Connection from airflow.providers.apache.spark.hooks.spark_sql import SparkSqlHook from airflow.utils import db -from dev.tests_common.test_utils.db import clear_db_connections - pytestmark = pytest.mark.db_test diff --git a/providers/tests/atlassian/jira/hooks/test_jira.py b/providers/tests/atlassian/jira/hooks/test_jira.py index e2cf9389471e7..fbb7913d128f0 100644 --- a/providers/tests/atlassian/jira/hooks/test_jira.py +++ b/providers/tests/atlassian/jira/hooks/test_jira.py @@ -20,13 +20,12 @@ from unittest import mock import pytest +from tests_common.test_utils.compat import connection_as_json from airflow.exceptions import AirflowProviderDeprecationWarning from airflow.models import Connection from airflow.providers.atlassian.jira.hooks.jira import JiraHook -from dev.tests_common.test_utils.compat import connection_as_json - @pytest.fixture def mocked_jira_client(): diff --git a/providers/tests/atlassian/jira/operators/test_jira.py b/providers/tests/atlassian/jira/operators/test_jira.py index 614c1a4939a90..67c63a60d61d4 100644 --- a/providers/tests/atlassian/jira/operators/test_jira.py +++ b/providers/tests/atlassian/jira/operators/test_jira.py @@ -20,13 +20,12 @@ from unittest import mock import pytest +from tests_common.test_utils.compat import connection_as_json from airflow.models import Connection from airflow.providers.atlassian.jira.operators.jira import JiraOperator from airflow.utils import timezone -from dev.tests_common.test_utils.compat import connection_as_json - DEFAULT_DATE = timezone.datetime(2017, 1, 1) MINIMAL_TEST_TICKET = { "id": "911539", diff --git a/providers/tests/atlassian/jira/sensors/test_jira.py b/providers/tests/atlassian/jira/sensors/test_jira.py index 9cb2572969ad4..ca027b7b5989d 100644 --- a/providers/tests/atlassian/jira/sensors/test_jira.py +++ b/providers/tests/atlassian/jira/sensors/test_jira.py @@ -20,13 +20,12 @@ from unittest import mock import pytest +from tests_common.test_utils.compat import connection_as_json from airflow.models import Connection from airflow.providers.atlassian.jira.sensors.jira import JiraTicketSensor from airflow.utils import timezone -from dev.tests_common.test_utils.compat import connection_as_json - DEFAULT_DATE = timezone.datetime(2017, 1, 1) MINIMAL_TEST_TICKET = { "id": "911539", diff --git a/providers/tests/celery/cli/test_celery_command.py b/providers/tests/celery/cli/test_celery_command.py index 03f5d60dabe40..0d0310f7452ea 100644 --- a/providers/tests/celery/cli/test_celery_command.py +++ b/providers/tests/celery/cli/test_celery_command.py @@ -24,6 +24,8 @@ import pytest import sqlalchemy +from tests_common.test_utils.compat import AIRFLOW_V_2_10_PLUS +from tests_common.test_utils.config import conf_vars import airflow from airflow.cli import cli_parser @@ -31,9 +33,6 @@ from airflow.executors import executor_loader from airflow.providers.celery.cli import celery_command -from dev.tests_common.test_utils.compat import AIRFLOW_V_2_10_PLUS -from dev.tests_common.test_utils.config import conf_vars - pytestmark = pytest.mark.db_test diff --git a/providers/tests/celery/executors/test_celery_executor.py b/providers/tests/celery/executors/test_celery_executor.py index 261a11f837e42..f72ee35b0f50f 100644 --- a/providers/tests/celery/executors/test_celery_executor.py +++ b/providers/tests/celery/executors/test_celery_executor.py @@ -32,6 +32,9 @@ from celery import Celery from celery.result import AsyncResult from kombu.asynchronous import set_event_loop +from tests_common.test_utils import db +from tests_common.test_utils.compat import AIRFLOW_V_2_10_PLUS +from tests_common.test_utils.config import conf_vars from airflow.configuration import conf from airflow.models.baseoperator import BaseOperator @@ -42,10 +45,6 @@ from airflow.utils import timezone from airflow.utils.state import State -from dev.tests_common.test_utils import db -from dev.tests_common.test_utils.compat import AIRFLOW_V_2_10_PLUS -from dev.tests_common.test_utils.config import conf_vars - pytestmark = pytest.mark.db_test diff --git a/providers/tests/celery/log_handlers/test_log_handlers.py b/providers/tests/celery/log_handlers/test_log_handlers.py index 9eb9e33e2ae0d..5d7d4d473d2fc 100644 --- a/providers/tests/celery/log_handlers/test_log_handlers.py +++ b/providers/tests/celery/log_handlers/test_log_handlers.py @@ -23,6 +23,8 @@ from unittest import mock import pytest +from tests_common.test_utils.compat import AIRFLOW_V_3_0_PLUS +from tests_common.test_utils.config import conf_vars from airflow.config_templates.airflow_local_settings import DEFAULT_LOGGING_CONFIG from airflow.executors import executor_loader @@ -36,9 +38,6 @@ from airflow.utils.timezone import datetime from airflow.utils.types import DagRunType -from dev.tests_common.test_utils.compat import AIRFLOW_V_3_0_PLUS -from dev.tests_common.test_utils.config import conf_vars - if AIRFLOW_V_3_0_PLUS: pass diff --git a/providers/tests/cncf/kubernetes/cli/test_kubernetes_command.py b/providers/tests/cncf/kubernetes/cli/test_kubernetes_command.py index 62019a8d2fe90..4d277c3b51e2d 100644 --- a/providers/tests/cncf/kubernetes/cli/test_kubernetes_command.py +++ b/providers/tests/cncf/kubernetes/cli/test_kubernetes_command.py @@ -24,13 +24,12 @@ import kubernetes import pytest from dateutil.parser import parse +from tests_common.test_utils.config import conf_vars from airflow.cli import cli_parser from airflow.executors import executor_loader from airflow.providers.cncf.kubernetes.cli import kubernetes_command -from dev.tests_common.test_utils.config import conf_vars - pytestmark = pytest.mark.db_test diff --git a/providers/tests/cncf/kubernetes/executors/test_kubernetes_executor.py b/providers/tests/cncf/kubernetes/executors/test_kubernetes_executor.py index 07b42ee3fc22a..85077ba1776bd 100644 --- a/providers/tests/cncf/kubernetes/executors/test_kubernetes_executor.py +++ b/providers/tests/cncf/kubernetes/executors/test_kubernetes_executor.py @@ -26,6 +26,8 @@ import yaml from kubernetes.client import models as k8s from kubernetes.client.rest import ApiException +from tests_common.test_utils.compat import BashOperator +from tests_common.test_utils.config import conf_vars from urllib3 import HTTPResponse from airflow.exceptions import AirflowException, AirflowProviderDeprecationWarning @@ -55,9 +57,6 @@ from airflow.utils import timezone from airflow.utils.state import State, TaskInstanceState -from dev.tests_common.test_utils.compat import BashOperator -from dev.tests_common.test_utils.config import conf_vars - pytestmark = pytest.mark.skip_if_database_isolation_mode diff --git a/providers/tests/cncf/kubernetes/hooks/test_kubernetes.py b/providers/tests/cncf/kubernetes/hooks/test_kubernetes.py index a6847e9c2fe56..d90ed0504401a 100644 --- a/providers/tests/cncf/kubernetes/hooks/test_kubernetes.py +++ b/providers/tests/cncf/kubernetes/hooks/test_kubernetes.py @@ -29,6 +29,8 @@ from kubernetes.client.rest import ApiException from kubernetes.config import ConfigException from sqlalchemy.orm import make_transient +from tests_common.test_utils.db import clear_db_connections +from tests_common.test_utils.providers import get_provider_min_airflow_version from airflow.exceptions import AirflowException, AirflowNotFoundException from airflow.hooks.base import BaseHook @@ -37,9 +39,6 @@ from airflow.utils import db from airflow.utils.db import merge_conn -from dev.tests_common.test_utils.db import clear_db_connections -from dev.tests_common.test_utils.providers import get_provider_min_airflow_version - pytestmark = pytest.mark.db_test KUBE_CONFIG_PATH = os.getenv("KUBECONFIG", "~/.kube/config") diff --git a/providers/tests/cncf/kubernetes/log_handlers/test_log_handlers.py b/providers/tests/cncf/kubernetes/log_handlers/test_log_handlers.py index b02f16ac92786..7ef025d7f29d4 100644 --- a/providers/tests/cncf/kubernetes/log_handlers/test_log_handlers.py +++ b/providers/tests/cncf/kubernetes/log_handlers/test_log_handlers.py @@ -26,6 +26,8 @@ import pytest from kubernetes.client import models as k8s +from tests_common.test_utils.compat import AIRFLOW_V_3_0_PLUS +from tests_common.test_utils.config import conf_vars from airflow.config_templates.airflow_local_settings import DEFAULT_LOGGING_CONFIG from airflow.executors import executor_loader @@ -42,9 +44,6 @@ from airflow.utils.timezone import datetime from airflow.utils.types import DagRunType -from dev.tests_common.test_utils.compat import AIRFLOW_V_3_0_PLUS -from dev.tests_common.test_utils.config import conf_vars - if AIRFLOW_V_3_0_PLUS: from airflow.utils.types import DagRunTriggeredByType diff --git a/providers/tests/cncf/kubernetes/operators/test_pod.py b/providers/tests/cncf/kubernetes/operators/test_pod.py index ac50641370fed..a272a5c4603f6 100644 --- a/providers/tests/cncf/kubernetes/operators/test_pod.py +++ b/providers/tests/cncf/kubernetes/operators/test_pod.py @@ -27,6 +27,7 @@ import pytest from kubernetes.client import ApiClient, V1Pod, V1PodSecurityContext, V1PodStatus, models as k8s from kubernetes.client.exceptions import ApiException +from tests_common.test_utils import db from urllib3 import HTTPResponse from airflow.exceptions import ( @@ -51,8 +52,6 @@ from airflow.utils.session import create_session from airflow.utils.types import DagRunType -from dev.tests_common.test_utils import db - pytestmark = [pytest.mark.db_test, pytest.mark.skip_if_database_isolation_mode] diff --git a/providers/tests/cncf/kubernetes/operators/test_spark_kubernetes.py b/providers/tests/cncf/kubernetes/operators/test_spark_kubernetes.py index 18bce53688d4f..ea15480ba1212 100644 --- a/providers/tests/cncf/kubernetes/operators/test_spark_kubernetes.py +++ b/providers/tests/cncf/kubernetes/operators/test_spark_kubernetes.py @@ -27,6 +27,7 @@ import pytest import yaml from kubernetes.client import models as k8s +from tests_common.test_utils.compat import AIRFLOW_V_2_8_PLUS from airflow import DAG from airflow.models import Connection, DagRun, TaskInstance @@ -34,8 +35,6 @@ from airflow.utils import db, timezone from airflow.utils.types import DagRunType -from dev.tests_common.test_utils.compat import AIRFLOW_V_2_8_PLUS - @patch("airflow.providers.cncf.kubernetes.operators.spark_kubernetes.KubernetesHook") def test_spark_kubernetes_operator(mock_kubernetes_hook, data_file): diff --git a/providers/tests/cncf/kubernetes/test_client.py b/providers/tests/cncf/kubernetes/test_client.py index 269717ffaa0f0..ce3a961eef44a 100644 --- a/providers/tests/cncf/kubernetes/test_client.py +++ b/providers/tests/cncf/kubernetes/test_client.py @@ -21,6 +21,7 @@ import pytest from kubernetes.client import Configuration +from tests_common.test_utils.config import conf_vars from urllib3.connection import HTTPConnection, HTTPSConnection from airflow.providers.cncf.kubernetes.kube_client import ( @@ -29,8 +30,6 @@ get_kube_client, ) -from dev.tests_common.test_utils.config import conf_vars - class TestClient: @mock.patch("airflow.providers.cncf.kubernetes.kube_client.config") diff --git a/providers/tests/cncf/kubernetes/test_template_rendering.py b/providers/tests/cncf/kubernetes/test_template_rendering.py index 180b7a1e2d2ef..bf67059ed11ff 100644 --- a/providers/tests/cncf/kubernetes/test_template_rendering.py +++ b/providers/tests/cncf/kubernetes/test_template_rendering.py @@ -21,6 +21,7 @@ import pytest from sqlalchemy.orm import make_transient +from tests_common.test_utils.compat import BashOperator from airflow.models.renderedtifields import RenderedTaskInstanceFields, RenderedTaskInstanceFields as RTIF from airflow.providers.cncf.kubernetes.template_rendering import get_rendered_k8s_spec, render_k8s_pod_yaml @@ -28,8 +29,6 @@ from airflow.utils.session import create_session from airflow.version import version -from dev.tests_common.test_utils.compat import BashOperator - pytestmark = [pytest.mark.db_test, pytest.mark.skip_if_database_isolation_mode] DEFAULT_DATE = timezone.datetime(2021, 9, 9) diff --git a/providers/tests/common/io/operators/test_file_transfer.py b/providers/tests/common/io/operators/test_file_transfer.py index 55a196fa8918c..4ce23de04534c 100644 --- a/providers/tests/common/io/operators/test_file_transfer.py +++ b/providers/tests/common/io/operators/test_file_transfer.py @@ -19,9 +19,9 @@ from unittest import mock -from airflow.providers.common.compat.openlineage.facet import Dataset +from tests_common.test_utils.compat import ignore_provider_compatibility_error -from dev.tests_common.test_utils.compat import ignore_provider_compatibility_error +from airflow.providers.common.compat.openlineage.facet import Dataset with ignore_provider_compatibility_error("2.8.0", __file__): from airflow.providers.common.io.operators.file_transfer import FileTransferOperator diff --git a/providers/tests/common/io/xcom/test_backend.py b/providers/tests/common/io/xcom/test_backend.py index ae45a2f863b78..a60fd872bc851 100644 --- a/providers/tests/common/io/xcom/test_backend.py +++ b/providers/tests/common/io/xcom/test_backend.py @@ -18,9 +18,8 @@ from __future__ import annotations import pytest - -from dev.tests_common.test_utils.compat import AIRFLOW_V_2_9_PLUS, ignore_provider_compatibility_error -from dev.tests_common.test_utils.db import is_db_isolation_mode +from tests_common.test_utils.compat import AIRFLOW_V_2_9_PLUS, ignore_provider_compatibility_error +from tests_common.test_utils.db import is_db_isolation_mode pytestmark = [ pytest.mark.db_test, @@ -35,12 +34,12 @@ with ignore_provider_compatibility_error("2.8.0", __file__): from airflow.providers.common.io.xcom.backend import XComObjectStorageBackend +from tests_common.test_utils import db +from tests_common.test_utils.config import conf_vars + from airflow.utils import timezone from airflow.utils.xcom import XCOM_RETURN_KEY -from dev.tests_common.test_utils import db -from dev.tests_common.test_utils.config import conf_vars - @pytest.fixture(autouse=True) def reset_db(): diff --git a/providers/tests/common/sql/hooks/test_dbapi.py b/providers/tests/common/sql/hooks/test_dbapi.py index 5017a5f347c82..0b4d7dc72e4b1 100644 --- a/providers/tests/common/sql/hooks/test_dbapi.py +++ b/providers/tests/common/sql/hooks/test_dbapi.py @@ -24,14 +24,13 @@ import pytest from pyodbc import Cursor +from tests_common.test_utils.compat import AIRFLOW_V_2_8_PLUS from airflow.config_templates.airflow_local_settings import DEFAULT_LOGGING_CONFIG from airflow.hooks.base import BaseHook from airflow.models import Connection from airflow.providers.common.sql.hooks.sql import DbApiHook, fetch_all_handler, fetch_one_handler -from dev.tests_common.test_utils.compat import AIRFLOW_V_2_8_PLUS - pytestmark = [ pytest.mark.skipif(not AIRFLOW_V_2_8_PLUS, reason="Tests for Airflow 2.8.0+ only"), ] diff --git a/providers/tests/common/sql/hooks/test_sql.py b/providers/tests/common/sql/hooks/test_sql.py index 87673f6de62e0..9908a512f8599 100644 --- a/providers/tests/common/sql/hooks/test_sql.py +++ b/providers/tests/common/sql/hooks/test_sql.py @@ -24,6 +24,7 @@ from unittest.mock import MagicMock import pytest +from tests_common.test_utils.compat import AIRFLOW_V_2_8_PLUS from airflow.config_templates.airflow_local_settings import DEFAULT_LOGGING_CONFIG from airflow.exceptions import AirflowProviderDeprecationWarning @@ -31,7 +32,6 @@ from airflow.providers.common.sql.hooks.sql import DbApiHook, fetch_all_handler from airflow.utils.session import provide_session -from dev.tests_common.test_utils.compat import AIRFLOW_V_2_8_PLUS from providers.tests.common.sql.test_utils import mock_hook pytestmark = [ diff --git a/providers/tests/common/sql/hooks/test_sqlparse.py b/providers/tests/common/sql/hooks/test_sqlparse.py index b3622bd8eff21..a32f5ee20880b 100644 --- a/providers/tests/common/sql/hooks/test_sqlparse.py +++ b/providers/tests/common/sql/hooks/test_sqlparse.py @@ -17,11 +17,10 @@ from __future__ import annotations import pytest +from tests_common.test_utils.compat import AIRFLOW_V_2_8_PLUS from airflow.providers.common.sql.hooks.sql import DbApiHook -from dev.tests_common.test_utils.compat import AIRFLOW_V_2_8_PLUS - pytestmark = [ pytest.mark.skipif(not AIRFLOW_V_2_8_PLUS, reason="Tests for Airflow 2.8.0+ only"), ] diff --git a/providers/tests/common/sql/operators/test_sql.py b/providers/tests/common/sql/operators/test_sql.py index c2e4bc6f2e86f..d2a371311c1d0 100644 --- a/providers/tests/common/sql/operators/test_sql.py +++ b/providers/tests/common/sql/operators/test_sql.py @@ -22,6 +22,7 @@ from unittest.mock import MagicMock import pytest +from tests_common.test_utils.compat import AIRFLOW_V_2_8_PLUS, AIRFLOW_V_3_0_PLUS from airflow import DAG from airflow.exceptions import AirflowException @@ -44,8 +45,6 @@ from airflow.utils.session import create_session from airflow.utils.state import State -from dev.tests_common.test_utils.compat import AIRFLOW_V_2_8_PLUS, AIRFLOW_V_3_0_PLUS - if AIRFLOW_V_3_0_PLUS: from airflow.utils.types import DagRunTriggeredByType diff --git a/providers/tests/common/sql/operators/test_sql_execute.py b/providers/tests/common/sql/operators/test_sql_execute.py index bb42cbaba2026..f03c80866ca39 100644 --- a/providers/tests/common/sql/operators/test_sql_execute.py +++ b/providers/tests/common/sql/operators/test_sql_execute.py @@ -22,6 +22,7 @@ from unittest.mock import MagicMock import pytest +from tests_common.test_utils.compat import AIRFLOW_V_2_8_PLUS from airflow.models import Connection from airflow.providers.common.compat.openlineage.facet import ( @@ -34,8 +35,6 @@ from airflow.providers.common.sql.operators.sql import SQLExecuteQueryOperator from airflow.providers.openlineage.extractors.base import OperatorLineage -from dev.tests_common.test_utils.compat import AIRFLOW_V_2_8_PLUS - pytestmark = [ pytest.mark.skipif(not AIRFLOW_V_2_8_PLUS, reason="Tests for Airflow 2.8.0+ only"), ] diff --git a/providers/tests/common/sql/sensors/test_sql.py b/providers/tests/common/sql/sensors/test_sql.py index 33e8fe6399738..c44bbf1d9d1ab 100644 --- a/providers/tests/common/sql/sensors/test_sql.py +++ b/providers/tests/common/sql/sensors/test_sql.py @@ -20,6 +20,7 @@ from unittest import mock import pytest +from tests_common.test_utils.compat import AIRFLOW_V_2_9_PLUS from airflow.exceptions import AirflowException from airflow.models.dag import DAG @@ -27,8 +28,6 @@ from airflow.providers.common.sql.sensors.sql import SqlSensor from airflow.utils.timezone import datetime -from dev.tests_common.test_utils.compat import AIRFLOW_V_2_9_PLUS - pytestmark = [ pytest.mark.skipif(not AIRFLOW_V_2_9_PLUS, reason="Tests for Airflow 2.8.0+ only"), pytest.mark.skip_if_database_isolation_mode, diff --git a/providers/tests/common/sql/test_utils.py b/providers/tests/common/sql/test_utils.py index 19b7bcc339411..50a217c87a2cc 100644 --- a/providers/tests/common/sql/test_utils.py +++ b/providers/tests/common/sql/test_utils.py @@ -21,11 +21,10 @@ from unittest import mock import pytest +from tests_common.test_utils.compat import AIRFLOW_V_2_8_PLUS from airflow.models import Connection -from dev.tests_common.test_utils.compat import AIRFLOW_V_2_8_PLUS - pytestmark = [ pytest.mark.skipif(not AIRFLOW_V_2_8_PLUS, reason="Tests for Airflow 2.8.0+ only"), ] diff --git a/providers/tests/conftest.py b/providers/tests/conftest.py index 6ca7990e6054f..85ffd8f1d9078 100644 --- a/providers/tests/conftest.py +++ b/providers/tests/conftest.py @@ -22,7 +22,7 @@ import pytest -pytest_plugins = "dev.tests_common.pytest_plugin" +pytest_plugins = "tests_common.pytest_plugin" @pytest.hookimpl(tryfirst=True) diff --git a/providers/tests/databricks/plugins/test_databricks_workflow.py b/providers/tests/databricks/plugins/test_databricks_workflow.py index 695466c62d266..72d6b3f321f39 100644 --- a/providers/tests/databricks/plugins/test_databricks_workflow.py +++ b/providers/tests/databricks/plugins/test_databricks_workflow.py @@ -21,6 +21,7 @@ import pytest from flask import url_for +from tests_common import RUNNING_TESTS_AGAINST_AIRFLOW_PACKAGES from airflow.exceptions import AirflowException from airflow.models.dagrun import DagRun @@ -41,8 +42,6 @@ ) from airflow.www.app import create_app -from dev.tests_common import RUNNING_TESTS_AGAINST_AIRFLOW_PACKAGES - DAG_ID = "test_dag" TASK_ID = "test_task" RUN_ID = "test_run_1" diff --git a/providers/tests/edge/api_endpoints/test_rpc_api_endpoint.py b/providers/tests/edge/api_endpoints/test_rpc_api_endpoint.py index 9a9b4a7dd885f..4a185971e67a7 100644 --- a/providers/tests/edge/api_endpoints/test_rpc_api_endpoint.py +++ b/providers/tests/edge/api_endpoints/test_rpc_api_endpoint.py @@ -21,6 +21,8 @@ from unittest import mock import pytest +from tests_common.test_utils.decorators import dont_initialize_flask_app_submodules +from tests_common.test_utils.mock_plugins import mock_plugin_manager from airflow.api_connexion.exceptions import PermissionDenied from airflow.configuration import conf @@ -41,9 +43,6 @@ from airflow.utils.state import State from airflow.www import app -from dev.tests_common.test_utils.decorators import dont_initialize_flask_app_submodules -from dev.tests_common.test_utils.mock_plugins import mock_plugin_manager - # Note: Sounds a bit strange to disable internal API tests in isolation mode but... # As long as the test is modelled to run its own internal API endpoints, it is conflicting # to the test setup with a dedicated internal API server. diff --git a/providers/tests/edge/cli/test_edge_command.py b/providers/tests/edge/cli/test_edge_command.py index af3e2c00e2998..e6e07d032baa6 100644 --- a/providers/tests/edge/cli/test_edge_command.py +++ b/providers/tests/edge/cli/test_edge_command.py @@ -23,6 +23,7 @@ import pytest import time_machine +from tests_common.test_utils.config import conf_vars from airflow.exceptions import AirflowException from airflow.providers.edge.cli.edge_command import ( @@ -34,8 +35,6 @@ from airflow.providers.edge.models.edge_worker import EdgeWorker, EdgeWorkerState from airflow.utils.state import TaskInstanceState -from dev.tests_common.test_utils.config import conf_vars - pytest.importorskip("pydantic", minversion="2.0.0") # Ignore the following error for mocking diff --git a/providers/tests/edge/plugins/test_edge_executor_plugin.py b/providers/tests/edge/plugins/test_edge_executor_plugin.py index d0c5a40770b31..bdd4847865539 100644 --- a/providers/tests/edge/plugins/test_edge_executor_plugin.py +++ b/providers/tests/edge/plugins/test_edge_executor_plugin.py @@ -19,12 +19,11 @@ import importlib import pytest +from tests_common.test_utils.config import conf_vars from airflow.plugins_manager import AirflowPlugin from airflow.providers.edge.plugins import edge_executor_plugin -from dev.tests_common.test_utils.config import conf_vars - def test_plugin_inactive(): with conf_vars({("edge", "api_enabled"): "false"}): diff --git a/providers/tests/elasticsearch/log/test_es_task_handler.py b/providers/tests/elasticsearch/log/test_es_task_handler.py index abde5daf8bf18..adb10090355b1 100644 --- a/providers/tests/elasticsearch/log/test_es_task_handler.py +++ b/providers/tests/elasticsearch/log/test_es_task_handler.py @@ -31,6 +31,8 @@ import elasticsearch import pendulum import pytest +from tests_common.test_utils.config import conf_vars +from tests_common.test_utils.db import clear_db_dags, clear_db_runs from airflow.configuration import conf from airflow.providers.elasticsearch.log.es_response import ElasticSearchResponse @@ -44,8 +46,6 @@ from airflow.utils.state import DagRunState, TaskInstanceState from airflow.utils.timezone import datetime -from dev.tests_common.test_utils.config import conf_vars -from dev.tests_common.test_utils.db import clear_db_dags, clear_db_runs from providers.tests.elasticsearch.log.elasticmock import elasticmock from providers.tests.elasticsearch.log.elasticmock.utilities import SearchFailedException diff --git a/providers/tests/fab/auth_manager/api/auth/backend/test_basic_auth.py b/providers/tests/fab/auth_manager/api/auth/backend/test_basic_auth.py index 2c783e2046f88..65db6a654ae23 100644 --- a/providers/tests/fab/auth_manager/api/auth/backend/test_basic_auth.py +++ b/providers/tests/fab/auth_manager/api/auth/backend/test_basic_auth.py @@ -21,12 +21,11 @@ import pytest from flask import Response from flask_appbuilder.const import AUTH_LDAP +from tests_common.test_utils.compat import AIRFLOW_V_2_9_PLUS from airflow.providers.fab.auth_manager.api.auth.backend.basic_auth import requires_authentication from airflow.www import app as application -from dev.tests_common.test_utils.compat import AIRFLOW_V_2_9_PLUS - pytestmark = [ pytest.mark.skipif(not AIRFLOW_V_2_9_PLUS, reason="Tests for Airflow 2.9.0+ only"), ] diff --git a/providers/tests/fab/auth_manager/api/auth/backend/test_kerberos_auth.py b/providers/tests/fab/auth_manager/api/auth/backend/test_kerberos_auth.py index 7d13a89e8db80..e57f34ce4b033 100644 --- a/providers/tests/fab/auth_manager/api/auth/backend/test_kerberos_auth.py +++ b/providers/tests/fab/auth_manager/api/auth/backend/test_kerberos_auth.py @@ -16,7 +16,7 @@ # under the License. from __future__ import annotations -from dev.tests_common.test_utils.compat import ignore_provider_compatibility_error +from tests_common.test_utils.compat import ignore_provider_compatibility_error with ignore_provider_compatibility_error("2.9.0+", __file__): from airflow.providers.fab.auth_manager.api.auth.backend.kerberos_auth import init_app diff --git a/providers/tests/fab/auth_manager/api/auth/backend/test_session.py b/providers/tests/fab/auth_manager/api/auth/backend/test_session.py index 513e8ec2aa293..405eafe11dfc4 100644 --- a/providers/tests/fab/auth_manager/api/auth/backend/test_session.py +++ b/providers/tests/fab/auth_manager/api/auth/backend/test_session.py @@ -20,12 +20,11 @@ import pytest from flask import Response +from tests_common.test_utils.compat import AIRFLOW_V_2_9_PLUS from airflow.providers.fab.auth_manager.api.auth.backend.session import requires_authentication from airflow.www import app as application -from dev.tests_common.test_utils.compat import AIRFLOW_V_2_9_PLUS - pytestmark = [ pytest.mark.skipif(not AIRFLOW_V_2_9_PLUS, reason="Tests for Airflow 2.9.0+ only"), ] diff --git a/providers/tests/fab/auth_manager/api_endpoints/api_connexion_utils.py b/providers/tests/fab/auth_manager/api_endpoints/api_connexion_utils.py index e4cbe93c9d62a..b208b845096b9 100644 --- a/providers/tests/fab/auth_manager/api_endpoints/api_connexion_utils.py +++ b/providers/tests/fab/auth_manager/api_endpoints/api_connexion_utils.py @@ -18,7 +18,7 @@ from contextlib import contextmanager -from dev.tests_common.test_utils.compat import ignore_provider_compatibility_error +from tests_common.test_utils.compat import ignore_provider_compatibility_error with ignore_provider_compatibility_error("2.9.0+", __file__): from airflow.providers.fab.auth_manager.security_manager.override import EXISTING_ROLES diff --git a/providers/tests/fab/auth_manager/api_endpoints/test_asset_endpoint.py b/providers/tests/fab/auth_manager/api_endpoints/test_asset_endpoint.py index 5c22e5ba7ff92..104e7943f4cd1 100644 --- a/providers/tests/fab/auth_manager/api_endpoints/test_asset_endpoint.py +++ b/providers/tests/fab/auth_manager/api_endpoints/test_asset_endpoint.py @@ -20,14 +20,14 @@ import pytest import time_machine +from tests_common.test_utils.compat import AIRFLOW_V_3_0_PLUS +from tests_common.test_utils.db import clear_db_assets, clear_db_runs +from tests_common.test_utils.www import _check_last_log from airflow.api_connexion.exceptions import EXCEPTIONS_LINK_MAP from airflow.security import permissions from airflow.utils import timezone -from dev.tests_common.test_utils.compat import AIRFLOW_V_3_0_PLUS -from dev.tests_common.test_utils.db import clear_db_assets, clear_db_runs -from dev.tests_common.test_utils.www import _check_last_log from providers.tests.fab.auth_manager.api_endpoints.api_connexion_utils import create_user, delete_user try: diff --git a/providers/tests/fab/auth_manager/api_endpoints/test_auth.py b/providers/tests/fab/auth_manager/api_endpoints/test_auth.py index 630ce7050bed5..fd29120070268 100644 --- a/providers/tests/fab/auth_manager/api_endpoints/test_auth.py +++ b/providers/tests/fab/auth_manager/api_endpoints/test_auth.py @@ -20,12 +20,11 @@ import pytest from flask_login import current_user - -from dev.tests_common.test_utils.api_connexion_utils import assert_401 -from dev.tests_common.test_utils.compat import AIRFLOW_V_3_0_PLUS -from dev.tests_common.test_utils.config import conf_vars -from dev.tests_common.test_utils.db import clear_db_pools -from dev.tests_common.test_utils.www import client_with_login +from tests_common.test_utils.api_connexion_utils import assert_401 +from tests_common.test_utils.compat import AIRFLOW_V_3_0_PLUS +from tests_common.test_utils.config import conf_vars +from tests_common.test_utils.db import clear_db_pools +from tests_common.test_utils.www import client_with_login pytestmark = [ pytest.mark.db_test, diff --git a/providers/tests/fab/auth_manager/api_endpoints/test_backfill_endpoint.py b/providers/tests/fab/auth_manager/api_endpoints/test_backfill_endpoint.py index f8015ff907ba6..4d7a5fc08776a 100644 --- a/providers/tests/fab/auth_manager/api_endpoints/test_backfill_endpoint.py +++ b/providers/tests/fab/auth_manager/api_endpoints/test_backfill_endpoint.py @@ -22,6 +22,13 @@ import pendulum import pytest +from tests_common.test_utils.compat import AIRFLOW_V_3_0_PLUS +from tests_common.test_utils.db import ( + clear_db_backfills, + clear_db_dags, + clear_db_runs, + clear_db_serialized_dags, +) from airflow.models import DagBag, DagModel from airflow.models.dag import DAG @@ -31,13 +38,6 @@ from airflow.utils import timezone from airflow.utils.session import provide_session -from dev.tests_common.test_utils.compat import AIRFLOW_V_3_0_PLUS -from dev.tests_common.test_utils.db import ( - clear_db_backfills, - clear_db_dags, - clear_db_runs, - clear_db_serialized_dags, -) from providers.tests.fab.auth_manager.api_endpoints.api_connexion_utils import create_user, delete_user try: diff --git a/providers/tests/fab/auth_manager/api_endpoints/test_cors.py b/providers/tests/fab/auth_manager/api_endpoints/test_cors.py index 8dbc4f964e61a..3741d71fb8b96 100644 --- a/providers/tests/fab/auth_manager/api_endpoints/test_cors.py +++ b/providers/tests/fab/auth_manager/api_endpoints/test_cors.py @@ -19,10 +19,9 @@ from base64 import b64encode import pytest - -from dev.tests_common.test_utils.compat import AIRFLOW_V_3_0_PLUS -from dev.tests_common.test_utils.config import conf_vars -from dev.tests_common.test_utils.db import clear_db_pools +from tests_common.test_utils.compat import AIRFLOW_V_3_0_PLUS +from tests_common.test_utils.config import conf_vars +from tests_common.test_utils.db import clear_db_pools pytestmark = [ pytest.mark.db_test, diff --git a/providers/tests/fab/auth_manager/api_endpoints/test_dag_endpoint.py b/providers/tests/fab/auth_manager/api_endpoints/test_dag_endpoint.py index e93425591f708..f2bd83efa331c 100644 --- a/providers/tests/fab/auth_manager/api_endpoints/test_dag_endpoint.py +++ b/providers/tests/fab/auth_manager/api_endpoints/test_dag_endpoint.py @@ -21,6 +21,9 @@ import pendulum import pytest +from tests_common.test_utils.compat import AIRFLOW_V_3_0_PLUS +from tests_common.test_utils.db import clear_db_dags, clear_db_runs, clear_db_serialized_dags +from tests_common.test_utils.www import _check_last_log from airflow.api_connexion.exceptions import EXCEPTIONS_LINK_MAP from airflow.models import DagBag, DagModel @@ -29,9 +32,6 @@ from airflow.security import permissions from airflow.utils.session import provide_session -from dev.tests_common.test_utils.compat import AIRFLOW_V_3_0_PLUS -from dev.tests_common.test_utils.db import clear_db_dags, clear_db_runs, clear_db_serialized_dags -from dev.tests_common.test_utils.www import _check_last_log from providers.tests.fab.auth_manager.api_endpoints.api_connexion_utils import create_user, delete_user pytestmark = [ diff --git a/providers/tests/fab/auth_manager/api_endpoints/test_dag_run_endpoint.py b/providers/tests/fab/auth_manager/api_endpoints/test_dag_run_endpoint.py index fa09df1be74e0..f822cddf49ee0 100644 --- a/providers/tests/fab/auth_manager/api_endpoints/test_dag_run_endpoint.py +++ b/providers/tests/fab/auth_manager/api_endpoints/test_dag_run_endpoint.py @@ -19,6 +19,8 @@ from datetime import timedelta import pytest +from tests_common.test_utils.compat import AIRFLOW_V_3_0_PLUS +from tests_common.test_utils.db import clear_db_dags, clear_db_runs, clear_db_serialized_dags from airflow.models.dag import DAG, DagModel from airflow.models.dagrun import DagRun @@ -28,8 +30,6 @@ from airflow.utils.session import create_session from airflow.utils.state import DagRunState -from dev.tests_common.test_utils.compat import AIRFLOW_V_3_0_PLUS -from dev.tests_common.test_utils.db import clear_db_dags, clear_db_runs, clear_db_serialized_dags from providers.tests.fab.auth_manager.api_endpoints.api_connexion_utils import ( create_user, delete_roles, diff --git a/providers/tests/fab/auth_manager/api_endpoints/test_dag_source_endpoint.py b/providers/tests/fab/auth_manager/api_endpoints/test_dag_source_endpoint.py index 27e41136555ea..8cfb6c58f5320 100644 --- a/providers/tests/fab/auth_manager/api_endpoints/test_dag_source_endpoint.py +++ b/providers/tests/fab/auth_manager/api_endpoints/test_dag_source_endpoint.py @@ -21,12 +21,12 @@ from typing import TYPE_CHECKING import pytest +from tests_common.test_utils.compat import AIRFLOW_V_3_0_PLUS +from tests_common.test_utils.db import clear_db_dag_code, clear_db_dags, clear_db_serialized_dags from airflow.models import DagBag from airflow.security import permissions -from dev.tests_common.test_utils.compat import AIRFLOW_V_3_0_PLUS -from dev.tests_common.test_utils.db import clear_db_dag_code, clear_db_dags, clear_db_serialized_dags from providers.tests.fab.auth_manager.api_endpoints.api_connexion_utils import create_user, delete_user pytestmark = [ diff --git a/providers/tests/fab/auth_manager/api_endpoints/test_dag_warning_endpoint.py b/providers/tests/fab/auth_manager/api_endpoints/test_dag_warning_endpoint.py index 01a2c68091ce1..ec8a72d74ee48 100644 --- a/providers/tests/fab/auth_manager/api_endpoints/test_dag_warning_endpoint.py +++ b/providers/tests/fab/auth_manager/api_endpoints/test_dag_warning_endpoint.py @@ -17,14 +17,14 @@ from __future__ import annotations import pytest +from tests_common.test_utils.compat import AIRFLOW_V_3_0_PLUS +from tests_common.test_utils.db import clear_db_dag_warnings, clear_db_dags from airflow.models.dag import DagModel from airflow.models.dagwarning import DagWarning from airflow.security import permissions from airflow.utils.session import create_session -from dev.tests_common.test_utils.compat import AIRFLOW_V_3_0_PLUS -from dev.tests_common.test_utils.db import clear_db_dag_warnings, clear_db_dags from providers.tests.fab.auth_manager.api_endpoints.api_connexion_utils import create_user, delete_user pytestmark = [ diff --git a/providers/tests/fab/auth_manager/api_endpoints/test_event_log_endpoint.py b/providers/tests/fab/auth_manager/api_endpoints/test_event_log_endpoint.py index 4794893241f6f..7d7868582934e 100644 --- a/providers/tests/fab/auth_manager/api_endpoints/test_event_log_endpoint.py +++ b/providers/tests/fab/auth_manager/api_endpoints/test_event_log_endpoint.py @@ -17,13 +17,13 @@ from __future__ import annotations import pytest +from tests_common.test_utils.compat import AIRFLOW_V_3_0_PLUS +from tests_common.test_utils.db import clear_db_logs from airflow.models import Log from airflow.security import permissions from airflow.utils import timezone -from dev.tests_common.test_utils.compat import AIRFLOW_V_3_0_PLUS -from dev.tests_common.test_utils.db import clear_db_logs from providers.tests.fab.auth_manager.api_endpoints.api_connexion_utils import create_user, delete_user pytestmark = [ diff --git a/providers/tests/fab/auth_manager/api_endpoints/test_import_error_endpoint.py b/providers/tests/fab/auth_manager/api_endpoints/test_import_error_endpoint.py index 110e8e6302553..b9b8d4ff9a421 100644 --- a/providers/tests/fab/auth_manager/api_endpoints/test_import_error_endpoint.py +++ b/providers/tests/fab/auth_manager/api_endpoints/test_import_error_endpoint.py @@ -17,14 +17,14 @@ from __future__ import annotations import pytest +from tests_common.test_utils.compat import AIRFLOW_V_3_0_PLUS, ParseImportError +from tests_common.test_utils.db import clear_db_dags, clear_db_import_errors +from tests_common.test_utils.permissions import _resource_name from airflow.models.dag import DagModel from airflow.security import permissions from airflow.utils import timezone -from dev.tests_common.test_utils.compat import AIRFLOW_V_3_0_PLUS, ParseImportError -from dev.tests_common.test_utils.db import clear_db_dags, clear_db_import_errors -from dev.tests_common.test_utils.permissions import _resource_name from providers.tests.fab.auth_manager.api_endpoints.api_connexion_utils import create_user, delete_user pytestmark = [ diff --git a/providers/tests/fab/auth_manager/api_endpoints/test_role_and_permission_endpoint.py b/providers/tests/fab/auth_manager/api_endpoints/test_role_and_permission_endpoint.py index b72c6fe6612f3..986b55e5ff42e 100644 --- a/providers/tests/fab/auth_manager/api_endpoints/test_role_and_permission_endpoint.py +++ b/providers/tests/fab/auth_manager/api_endpoints/test_role_and_permission_endpoint.py @@ -17,12 +17,12 @@ from __future__ import annotations import pytest +from tests_common.test_utils.api_connexion_utils import assert_401 +from tests_common.test_utils.compat import ignore_provider_compatibility_error from airflow.api_connexion.exceptions import EXCEPTIONS_LINK_MAP from airflow.security import permissions -from dev.tests_common.test_utils.api_connexion_utils import assert_401 -from dev.tests_common.test_utils.compat import ignore_provider_compatibility_error from providers.tests.fab.auth_manager.api_endpoints.api_connexion_utils import ( create_role, create_user, diff --git a/providers/tests/fab/auth_manager/api_endpoints/test_task_instance_endpoint.py b/providers/tests/fab/auth_manager/api_endpoints/test_task_instance_endpoint.py index 7d379b6f8c007..6aea6b86f7b50 100644 --- a/providers/tests/fab/auth_manager/api_endpoints/test_task_instance_endpoint.py +++ b/providers/tests/fab/auth_manager/api_endpoints/test_task_instance_endpoint.py @@ -20,6 +20,8 @@ import urllib import pytest +from tests_common.test_utils.compat import AIRFLOW_V_3_0_PLUS +from tests_common.test_utils.db import clear_db_runs, clear_db_sla_miss, clear_rendered_ti_fields from airflow.api_connexion.exceptions import EXCEPTIONS_LINK_MAP from airflow.models import DagRun, TaskInstance @@ -29,8 +31,6 @@ from airflow.utils.timezone import datetime from airflow.utils.types import DagRunType -from dev.tests_common.test_utils.compat import AIRFLOW_V_3_0_PLUS -from dev.tests_common.test_utils.db import clear_db_runs, clear_db_sla_miss, clear_rendered_ti_fields from providers.tests.fab.auth_manager.api_endpoints.api_connexion_utils import ( create_user, delete_roles, diff --git a/providers/tests/fab/auth_manager/api_endpoints/test_user_endpoint.py b/providers/tests/fab/auth_manager/api_endpoints/test_user_endpoint.py index c7a20cb59c320..29f84850d9ba6 100644 --- a/providers/tests/fab/auth_manager/api_endpoints/test_user_endpoint.py +++ b/providers/tests/fab/auth_manager/api_endpoints/test_user_endpoint.py @@ -20,15 +20,15 @@ import pytest from sqlalchemy.sql.functions import count +from tests_common.test_utils.api_connexion_utils import assert_401 +from tests_common.test_utils.compat import ignore_provider_compatibility_error +from tests_common.test_utils.config import conf_vars from airflow.api_connexion.exceptions import EXCEPTIONS_LINK_MAP from airflow.security import permissions from airflow.utils import timezone from airflow.utils.session import create_session -from dev.tests_common.test_utils.api_connexion_utils import assert_401 -from dev.tests_common.test_utils.compat import ignore_provider_compatibility_error -from dev.tests_common.test_utils.config import conf_vars from providers.tests.fab.auth_manager.api_endpoints.api_connexion_utils import ( create_user, delete_role, diff --git a/providers/tests/fab/auth_manager/api_endpoints/test_variable_endpoint.py b/providers/tests/fab/auth_manager/api_endpoints/test_variable_endpoint.py index 802eb4824087e..038dea9e72df9 100644 --- a/providers/tests/fab/auth_manager/api_endpoints/test_variable_endpoint.py +++ b/providers/tests/fab/auth_manager/api_endpoints/test_variable_endpoint.py @@ -17,12 +17,12 @@ from __future__ import annotations import pytest +from tests_common.test_utils.compat import AIRFLOW_V_3_0_PLUS +from tests_common.test_utils.db import clear_db_variables from airflow.models import Variable from airflow.security import permissions -from dev.tests_common.test_utils.compat import AIRFLOW_V_3_0_PLUS -from dev.tests_common.test_utils.db import clear_db_variables from providers.tests.fab.auth_manager.api_endpoints.api_connexion_utils import create_user, delete_user pytestmark = [ diff --git a/providers/tests/fab/auth_manager/api_endpoints/test_xcom_endpoint.py b/providers/tests/fab/auth_manager/api_endpoints/test_xcom_endpoint.py index 06e8ee4847762..f45cf58de6a95 100644 --- a/providers/tests/fab/auth_manager/api_endpoints/test_xcom_endpoint.py +++ b/providers/tests/fab/auth_manager/api_endpoints/test_xcom_endpoint.py @@ -19,6 +19,8 @@ from datetime import timedelta import pytest +from tests_common.test_utils.compat import AIRFLOW_V_3_0_PLUS +from tests_common.test_utils.db import clear_db_dags, clear_db_runs, clear_db_xcom from airflow.models.dag import DagModel from airflow.models.dagrun import DagRun @@ -30,8 +32,6 @@ from airflow.utils.session import create_session from airflow.utils.types import DagRunType -from dev.tests_common.test_utils.compat import AIRFLOW_V_3_0_PLUS -from dev.tests_common.test_utils.db import clear_db_dags, clear_db_runs, clear_db_xcom from providers.tests.fab.auth_manager.api_endpoints.api_connexion_utils import create_user, delete_user pytestmark = [ diff --git a/providers/tests/fab/auth_manager/cli_commands/test_definition.py b/providers/tests/fab/auth_manager/cli_commands/test_definition.py index de906bef1ba30..572cbee05e3db 100644 --- a/providers/tests/fab/auth_manager/cli_commands/test_definition.py +++ b/providers/tests/fab/auth_manager/cli_commands/test_definition.py @@ -16,7 +16,7 @@ # under the License. from __future__ import annotations -from dev.tests_common.test_utils.compat import ignore_provider_compatibility_error +from tests_common.test_utils.compat import ignore_provider_compatibility_error with ignore_provider_compatibility_error("2.9.0+", __file__): from airflow.providers.fab.auth_manager.cli_commands.definition import ( diff --git a/providers/tests/fab/auth_manager/cli_commands/test_role_command.py b/providers/tests/fab/auth_manager/cli_commands/test_role_command.py index fd176702c7219..d07cfc61242fe 100644 --- a/providers/tests/fab/auth_manager/cli_commands/test_role_command.py +++ b/providers/tests/fab/auth_manager/cli_commands/test_role_command.py @@ -23,12 +23,11 @@ from typing import TYPE_CHECKING import pytest +from tests_common.test_utils.compat import ignore_provider_compatibility_error +from tests_common.test_utils.config import conf_vars from airflow.cli import cli_parser -from dev.tests_common.test_utils.compat import ignore_provider_compatibility_error -from dev.tests_common.test_utils.config import conf_vars - with ignore_provider_compatibility_error("2.9.0+", __file__): from airflow.providers.fab.auth_manager.cli_commands import role_command from airflow.providers.fab.auth_manager.cli_commands.utils import get_application_builder diff --git a/providers/tests/fab/auth_manager/cli_commands/test_sync_perm_command.py b/providers/tests/fab/auth_manager/cli_commands/test_sync_perm_command.py index e0e4a70f4ac88..a0345909dc2df 100644 --- a/providers/tests/fab/auth_manager/cli_commands/test_sync_perm_command.py +++ b/providers/tests/fab/auth_manager/cli_commands/test_sync_perm_command.py @@ -20,11 +20,10 @@ from unittest import mock import pytest +from tests_common.test_utils.compat import ignore_provider_compatibility_error from airflow.cli import cli_parser -from dev.tests_common.test_utils.compat import ignore_provider_compatibility_error - with ignore_provider_compatibility_error("2.9.0+", __file__): from airflow.providers.fab.auth_manager.cli_commands import sync_perm_command diff --git a/providers/tests/fab/auth_manager/cli_commands/test_user_command.py b/providers/tests/fab/auth_manager/cli_commands/test_user_command.py index 5f2f66b0866a2..6ccd4c99716ab 100644 --- a/providers/tests/fab/auth_manager/cli_commands/test_user_command.py +++ b/providers/tests/fab/auth_manager/cli_commands/test_user_command.py @@ -24,11 +24,10 @@ from io import StringIO import pytest +from tests_common.test_utils.compat import ignore_provider_compatibility_error from airflow.cli import cli_parser -from dev.tests_common.test_utils.compat import ignore_provider_compatibility_error - with ignore_provider_compatibility_error("2.9.0+", __file__): from airflow.providers.fab.auth_manager.cli_commands import user_command from airflow.providers.fab.auth_manager.cli_commands.utils import get_application_builder diff --git a/providers/tests/fab/auth_manager/cli_commands/test_utils.py b/providers/tests/fab/auth_manager/cli_commands/test_utils.py index f52defae6bb8f..193317249ed11 100644 --- a/providers/tests/fab/auth_manager/cli_commands/test_utils.py +++ b/providers/tests/fab/auth_manager/cli_commands/test_utils.py @@ -17,8 +17,7 @@ from __future__ import annotations import pytest - -from dev.tests_common.test_utils.compat import ignore_provider_compatibility_error +from tests_common.test_utils.compat import ignore_provider_compatibility_error with ignore_provider_compatibility_error("2.9.0+", __file__): from airflow.providers.fab.auth_manager.cli_commands.utils import get_application_builder diff --git a/providers/tests/fab/auth_manager/conftest.py b/providers/tests/fab/auth_manager/conftest.py index 9102f5d0f65d4..5818ecf435db6 100644 --- a/providers/tests/fab/auth_manager/conftest.py +++ b/providers/tests/fab/auth_manager/conftest.py @@ -17,12 +17,11 @@ from __future__ import annotations import pytest +from tests_common.test_utils.config import conf_vars +from tests_common.test_utils.decorators import dont_initialize_flask_app_submodules from airflow.www import app -from dev.tests_common.test_utils.config import conf_vars -from dev.tests_common.test_utils.decorators import dont_initialize_flask_app_submodules - @pytest.fixture(scope="session") def minimal_app_for_auth_api(): diff --git a/providers/tests/fab/auth_manager/decorators/test_auth.py b/providers/tests/fab/auth_manager/decorators/test_auth.py index 202f0d6227073..d6f60bf42f1fb 100644 --- a/providers/tests/fab/auth_manager/decorators/test_auth.py +++ b/providers/tests/fab/auth_manager/decorators/test_auth.py @@ -19,11 +19,10 @@ from unittest.mock import Mock, patch import pytest +from tests_common.test_utils.compat import ignore_provider_compatibility_error from airflow.security.permissions import ACTION_CAN_READ, RESOURCE_DAG -from dev.tests_common.test_utils.compat import ignore_provider_compatibility_error - permissions = [(ACTION_CAN_READ, RESOURCE_DAG)] with ignore_provider_compatibility_error("2.9.0+", __file__): diff --git a/providers/tests/fab/auth_manager/models/test_anonymous_user.py b/providers/tests/fab/auth_manager/models/test_anonymous_user.py index 419d17aa9f3f9..eaf6b357f9264 100644 --- a/providers/tests/fab/auth_manager/models/test_anonymous_user.py +++ b/providers/tests/fab/auth_manager/models/test_anonymous_user.py @@ -17,7 +17,7 @@ # under the License. from __future__ import annotations -from dev.tests_common.test_utils.compat import ignore_provider_compatibility_error +from tests_common.test_utils.compat import ignore_provider_compatibility_error with ignore_provider_compatibility_error("2.9.0+", __file__): from airflow.providers.fab.auth_manager.models.anonymous_user import AnonymousUser diff --git a/providers/tests/fab/auth_manager/schemas/test_user_schema.py b/providers/tests/fab/auth_manager/schemas/test_user_schema.py index 648372d3baebd..9f8dbd3742fa8 100644 --- a/providers/tests/fab/auth_manager/schemas/test_user_schema.py +++ b/providers/tests/fab/auth_manager/schemas/test_user_schema.py @@ -17,10 +17,10 @@ from __future__ import annotations import pytest +from tests_common.test_utils.compat import ignore_provider_compatibility_error from airflow.utils import timezone -from dev.tests_common.test_utils.compat import ignore_provider_compatibility_error from providers.tests.fab.auth_manager.api_endpoints.api_connexion_utils import create_role, delete_role with ignore_provider_compatibility_error("2.9.0+", __file__): diff --git a/providers/tests/fab/auth_manager/security_manager/test_constants.py b/providers/tests/fab/auth_manager/security_manager/test_constants.py index a6566fd987109..dbe592c59d747 100644 --- a/providers/tests/fab/auth_manager/security_manager/test_constants.py +++ b/providers/tests/fab/auth_manager/security_manager/test_constants.py @@ -16,7 +16,7 @@ # under the License. from __future__ import annotations -from dev.tests_common.test_utils.compat import ignore_provider_compatibility_error +from tests_common.test_utils.compat import ignore_provider_compatibility_error with ignore_provider_compatibility_error("2.9.0+", __file__): from airflow.providers.fab.auth_manager.security_manager.constants import EXISTING_ROLES diff --git a/providers/tests/fab/auth_manager/security_manager/test_override.py b/providers/tests/fab/auth_manager/security_manager/test_override.py index 2733b688d1ae5..6ba1ccda292cd 100644 --- a/providers/tests/fab/auth_manager/security_manager/test_override.py +++ b/providers/tests/fab/auth_manager/security_manager/test_override.py @@ -19,7 +19,7 @@ from unittest import mock from unittest.mock import Mock -from dev.tests_common.test_utils.compat import ignore_provider_compatibility_error +from tests_common.test_utils.compat import ignore_provider_compatibility_error with ignore_provider_compatibility_error("2.9.0+", __file__): from airflow.providers.fab.auth_manager.security_manager.override import FabAirflowSecurityManagerOverride diff --git a/providers/tests/fab/auth_manager/test_fab_auth_manager.py b/providers/tests/fab/auth_manager/test_fab_auth_manager.py index 064c8e0dfd4c7..0d111f0453ad4 100644 --- a/providers/tests/fab/auth_manager/test_fab_auth_manager.py +++ b/providers/tests/fab/auth_manager/test_fab_auth_manager.py @@ -31,7 +31,7 @@ except ImportError: pass -from dev.tests_common.test_utils.compat import ignore_provider_compatibility_error +from tests_common.test_utils.compat import ignore_provider_compatibility_error with ignore_provider_compatibility_error("2.9.0+", __file__): from airflow.providers.fab.auth_manager.fab_auth_manager import FabAuthManager diff --git a/providers/tests/fab/auth_manager/test_models.py b/providers/tests/fab/auth_manager/test_models.py index 6f03be373187b..76b69c3dea734 100644 --- a/providers/tests/fab/auth_manager/test_models.py +++ b/providers/tests/fab/auth_manager/test_models.py @@ -19,8 +19,7 @@ from unittest import mock from sqlalchemy import Column, MetaData, String, Table - -from dev.tests_common.test_utils.compat import ignore_provider_compatibility_error +from tests_common.test_utils.compat import ignore_provider_compatibility_error with ignore_provider_compatibility_error("2.9.0+", __file__): from airflow.providers.fab.auth_manager.models import ( diff --git a/providers/tests/fab/auth_manager/test_security.py b/providers/tests/fab/auth_manager/test_security.py index 8c9e221b71df0..8156999f01615 100644 --- a/providers/tests/fab/auth_manager/test_security.py +++ b/providers/tests/fab/auth_manager/test_security.py @@ -31,19 +31,23 @@ from flask_appbuilder import SQLA, Model, expose, has_access from flask_appbuilder.views import BaseView, ModelView from sqlalchemy import Column, Date, Float, Integer, String +from tests_common.test_utils.compat import ignore_provider_compatibility_error from airflow.configuration import initialize_config from airflow.exceptions import AirflowException from airflow.models import DagModel from airflow.models.dag import DAG -from dev.tests_common.test_utils.compat import ignore_provider_compatibility_error - with ignore_provider_compatibility_error("2.9.0+", __file__): from airflow.providers.fab.auth_manager.fab_auth_manager import FabAuthManager from airflow.providers.fab.auth_manager.models import assoc_permission_role from airflow.providers.fab.auth_manager.models.anonymous_user import AnonymousUser +from tests_common.test_utils.asserts import assert_queries_count +from tests_common.test_utils.db import clear_db_dags, clear_db_runs +from tests_common.test_utils.mock_security_manager import MockSecurityManager +from tests_common.test_utils.permissions import _resource_name + from airflow.security import permissions from airflow.security.permissions import ACTION_CAN_READ from airflow.www import app as application @@ -51,10 +55,6 @@ from airflow.www.extensions.init_auth_manager import get_auth_manager from airflow.www.utils import CustomSQLAInterface -from dev.tests_common.test_utils.asserts import assert_queries_count -from dev.tests_common.test_utils.db import clear_db_dags, clear_db_runs -from dev.tests_common.test_utils.mock_security_manager import MockSecurityManager -from dev.tests_common.test_utils.permissions import _resource_name from providers.tests.fab.auth_manager.api_endpoints.api_connexion_utils import ( create_user, create_user_scope, diff --git a/providers/tests/fab/auth_manager/views/test_permissions.py b/providers/tests/fab/auth_manager/views/test_permissions.py index 2ac26ffe45e87..eeb005b47e69a 100644 --- a/providers/tests/fab/auth_manager/views/test_permissions.py +++ b/providers/tests/fab/auth_manager/views/test_permissions.py @@ -18,12 +18,12 @@ from __future__ import annotations import pytest +from tests_common.test_utils.compat import AIRFLOW_V_2_9_PLUS +from tests_common.test_utils.www import client_with_login from airflow.security import permissions from airflow.www import app as application -from dev.tests_common.test_utils.compat import AIRFLOW_V_2_9_PLUS -from dev.tests_common.test_utils.www import client_with_login from providers.tests.fab.auth_manager.api_endpoints.api_connexion_utils import create_user, delete_user pytestmark = [ diff --git a/providers/tests/fab/auth_manager/views/test_roles_list.py b/providers/tests/fab/auth_manager/views/test_roles_list.py index 3c1509d75350a..f94907c3e0504 100644 --- a/providers/tests/fab/auth_manager/views/test_roles_list.py +++ b/providers/tests/fab/auth_manager/views/test_roles_list.py @@ -18,12 +18,12 @@ from __future__ import annotations import pytest +from tests_common.test_utils.compat import AIRFLOW_V_2_9_PLUS +from tests_common.test_utils.www import client_with_login from airflow.security import permissions from airflow.www import app as application -from dev.tests_common.test_utils.compat import AIRFLOW_V_2_9_PLUS -from dev.tests_common.test_utils.www import client_with_login from providers.tests.fab.auth_manager.api_endpoints.api_connexion_utils import create_user, delete_user pytestmark = [ diff --git a/providers/tests/fab/auth_manager/views/test_user.py b/providers/tests/fab/auth_manager/views/test_user.py index ee068f7f319fe..140d7cd331255 100644 --- a/providers/tests/fab/auth_manager/views/test_user.py +++ b/providers/tests/fab/auth_manager/views/test_user.py @@ -18,12 +18,12 @@ from __future__ import annotations import pytest +from tests_common.test_utils.compat import AIRFLOW_V_2_9_PLUS +from tests_common.test_utils.www import client_with_login from airflow.security import permissions from airflow.www import app as application -from dev.tests_common.test_utils.compat import AIRFLOW_V_2_9_PLUS -from dev.tests_common.test_utils.www import client_with_login from providers.tests.fab.auth_manager.api_endpoints.api_connexion_utils import create_user, delete_user pytestmark = [ diff --git a/providers/tests/fab/auth_manager/views/test_user_edit.py b/providers/tests/fab/auth_manager/views/test_user_edit.py index 7cdc1a493b007..fb994dbd66ec7 100644 --- a/providers/tests/fab/auth_manager/views/test_user_edit.py +++ b/providers/tests/fab/auth_manager/views/test_user_edit.py @@ -18,12 +18,12 @@ from __future__ import annotations import pytest +from tests_common.test_utils.compat import AIRFLOW_V_2_9_PLUS +from tests_common.test_utils.www import client_with_login from airflow.security import permissions from airflow.www import app as application -from dev.tests_common.test_utils.compat import AIRFLOW_V_2_9_PLUS -from dev.tests_common.test_utils.www import client_with_login from providers.tests.fab.auth_manager.api_endpoints.api_connexion_utils import create_user, delete_user pytestmark = [ diff --git a/providers/tests/fab/auth_manager/views/test_user_stats.py b/providers/tests/fab/auth_manager/views/test_user_stats.py index e50bc87535a48..bb7d627fdaa64 100644 --- a/providers/tests/fab/auth_manager/views/test_user_stats.py +++ b/providers/tests/fab/auth_manager/views/test_user_stats.py @@ -18,12 +18,12 @@ from __future__ import annotations import pytest +from tests_common.test_utils.compat import AIRFLOW_V_2_9_PLUS +from tests_common.test_utils.www import client_with_login from airflow.security import permissions from airflow.www import app as application -from dev.tests_common.test_utils.compat import AIRFLOW_V_2_9_PLUS -from dev.tests_common.test_utils.www import client_with_login from providers.tests.fab.auth_manager.api_endpoints.api_connexion_utils import create_user, delete_user pytestmark = [ diff --git a/providers/tests/google/cloud/hooks/test_bigquery_system.py b/providers/tests/google/cloud/hooks/test_bigquery_system.py index 676ab35035839..454ab63079794 100644 --- a/providers/tests/google/cloud/hooks/test_bigquery_system.py +++ b/providers/tests/google/cloud/hooks/test_bigquery_system.py @@ -20,10 +20,10 @@ from __future__ import annotations import pytest +from tests_common.test_utils.gcp_system_helpers import GoogleSystemTest from airflow.providers.google.cloud.hooks import bigquery as hook -from dev.tests_common.test_utils.gcp_system_helpers import GoogleSystemTest from providers.tests.google.cloud.utils.gcp_authenticator import GCP_BIGQUERY_KEY diff --git a/providers/tests/google/cloud/hooks/test_kms_system.py b/providers/tests/google/cloud/hooks/test_kms_system.py index 374fabb5246dd..36c5bfa207f3a 100644 --- a/providers/tests/google/cloud/hooks/test_kms_system.py +++ b/providers/tests/google/cloud/hooks/test_kms_system.py @@ -21,10 +21,10 @@ from tempfile import TemporaryDirectory import pytest +from tests_common.test_utils.gcp_system_helpers import GoogleSystemTest, provide_gcp_context from airflow.providers.google.cloud.hooks.kms import CloudKMSHook -from dev.tests_common.test_utils.gcp_system_helpers import GoogleSystemTest, provide_gcp_context from providers.tests.google.cloud.utils.gcp_authenticator import GCP_KMS_KEY # To prevent resource name collisions, key ring and key resources CANNOT be deleted, so diff --git a/providers/tests/google/cloud/hooks/test_secret_manager_system.py b/providers/tests/google/cloud/hooks/test_secret_manager_system.py index d13305f52b42e..9f512f5f23c8f 100644 --- a/providers/tests/google/cloud/hooks/test_secret_manager_system.py +++ b/providers/tests/google/cloud/hooks/test_secret_manager_system.py @@ -19,10 +19,10 @@ import os import pytest +from tests_common.test_utils.gcp_system_helpers import GoogleSystemTest, provide_gcp_context from airflow.providers.google.cloud.hooks.secret_manager import SecretsManagerHook -from dev.tests_common.test_utils.gcp_system_helpers import GoogleSystemTest, provide_gcp_context from providers.tests.google.cloud.utils.gcp_authenticator import GCP_SECRET_MANAGER_KEY TEST_SECRET_ID = os.environ.get("GCP_SECRET_MANAGER_SECRET_ID", "test-secret") diff --git a/providers/tests/google/cloud/log/test_gcs_task_handler.py b/providers/tests/google/cloud/log/test_gcs_task_handler.py index 9f27c618de29d..369f4b888058b 100644 --- a/providers/tests/google/cloud/log/test_gcs_task_handler.py +++ b/providers/tests/google/cloud/log/test_gcs_task_handler.py @@ -23,14 +23,13 @@ from unittest.mock import MagicMock import pytest +from tests_common.test_utils.config import conf_vars +from tests_common.test_utils.db import clear_db_dags, clear_db_runs from airflow.providers.google.cloud.log.gcs_task_handler import GCSTaskHandler from airflow.utils.state import TaskInstanceState from airflow.utils.timezone import datetime -from dev.tests_common.test_utils.config import conf_vars -from dev.tests_common.test_utils.db import clear_db_dags, clear_db_runs - @pytest.mark.db_test class TestGCSTaskHandler: diff --git a/providers/tests/google/cloud/log/test_gcs_task_handler_system.py b/providers/tests/google/cloud/log/test_gcs_task_handler_system.py index eb1ce08d14f5c..e3e2bd2cafccc 100644 --- a/providers/tests/google/cloud/log/test_gcs_task_handler_system.py +++ b/providers/tests/google/cloud/log/test_gcs_task_handler_system.py @@ -23,6 +23,13 @@ from unittest import mock import pytest +from tests_common.test_utils.config import conf_vars +from tests_common.test_utils.db import clear_db_connections, clear_db_runs +from tests_common.test_utils.gcp_system_helpers import ( + GoogleSystemTest, + provide_gcp_context, + resolve_full_gcp_key_path, +) from airflow import settings from airflow.example_dags import example_complex @@ -30,13 +37,6 @@ from airflow.utils.log.log_reader import TaskLogReader from airflow.utils.session import provide_session -from dev.tests_common.test_utils.config import conf_vars -from dev.tests_common.test_utils.db import clear_db_connections, clear_db_runs -from dev.tests_common.test_utils.gcp_system_helpers import ( - GoogleSystemTest, - provide_gcp_context, - resolve_full_gcp_key_path, -) from providers.tests.google.cloud.utils.gcp_authenticator import GCP_GCS_KEY diff --git a/providers/tests/google/cloud/log/test_stackdriver_task_handler.py b/providers/tests/google/cloud/log/test_stackdriver_task_handler.py index 783f1a34b762c..60752f3b0d3f3 100644 --- a/providers/tests/google/cloud/log/test_stackdriver_task_handler.py +++ b/providers/tests/google/cloud/log/test_stackdriver_task_handler.py @@ -24,16 +24,15 @@ import pytest from google.cloud.logging import Resource from google.cloud.logging_v2.types import ListLogEntriesRequest, ListLogEntriesResponse, LogEntry +from tests_common.test_utils.compat import AIRFLOW_V_2_9_PLUS +from tests_common.test_utils.config import conf_vars +from tests_common.test_utils.db import clear_db_dags, clear_db_runs from airflow.exceptions import RemovedInAirflow3Warning from airflow.providers.google.cloud.log.stackdriver_task_handler import StackdriverTaskHandler from airflow.utils import timezone from airflow.utils.state import TaskInstanceState -from dev.tests_common.test_utils.compat import AIRFLOW_V_2_9_PLUS -from dev.tests_common.test_utils.config import conf_vars -from dev.tests_common.test_utils.db import clear_db_dags, clear_db_runs - def _create_list_log_entries_response_mock(messages, token): return ListLogEntriesResponse( diff --git a/providers/tests/google/cloud/log/test_stackdriver_task_handler_system.py b/providers/tests/google/cloud/log/test_stackdriver_task_handler_system.py index a53dd43d08feb..da01e9c770570 100644 --- a/providers/tests/google/cloud/log/test_stackdriver_task_handler_system.py +++ b/providers/tests/google/cloud/log/test_stackdriver_task_handler_system.py @@ -23,6 +23,13 @@ from unittest import mock import pytest +from tests_common.test_utils.config import conf_vars +from tests_common.test_utils.db import clear_db_runs +from tests_common.test_utils.gcp_system_helpers import ( + GoogleSystemTest, + provide_gcp_context, + resolve_full_gcp_key_path, +) from airflow import settings from airflow.example_dags import example_complex @@ -30,13 +37,6 @@ from airflow.utils.log.log_reader import TaskLogReader from airflow.utils.session import provide_session -from dev.tests_common.test_utils.config import conf_vars -from dev.tests_common.test_utils.db import clear_db_runs -from dev.tests_common.test_utils.gcp_system_helpers import ( - GoogleSystemTest, - provide_gcp_context, - resolve_full_gcp_key_path, -) from providers.tests.google.cloud.utils.gcp_authenticator import GCP_STACKDRIVER diff --git a/providers/tests/google/cloud/operators/test_bigquery.py b/providers/tests/google/cloud/operators/test_bigquery.py index 3836d737662fc..1edc67c45a761 100644 --- a/providers/tests/google/cloud/operators/test_bigquery.py +++ b/providers/tests/google/cloud/operators/test_bigquery.py @@ -27,6 +27,12 @@ import pytest from google.cloud.bigquery import DEFAULT_RETRY, ScalarQueryParameter from google.cloud.exceptions import Conflict +from tests_common.test_utils.db import ( + clear_db_dags, + clear_db_runs, + clear_db_serialized_dags, + clear_db_xcom, +) from airflow.exceptions import ( AirflowException, @@ -75,13 +81,6 @@ from airflow.serialization.serialized_objects import SerializedDAG from airflow.utils.timezone import datetime -from dev.tests_common.test_utils.db import ( - clear_db_dags, - clear_db_runs, - clear_db_serialized_dags, - clear_db_xcom, -) - pytestmark = pytest.mark.db_test diff --git a/providers/tests/google/cloud/operators/test_bigquery_dts.py b/providers/tests/google/cloud/operators/test_bigquery_dts.py index f50c42805b49d..b196237b5bf84 100644 --- a/providers/tests/google/cloud/operators/test_bigquery_dts.py +++ b/providers/tests/google/cloud/operators/test_bigquery_dts.py @@ -21,6 +21,7 @@ from google.api_core.gapic_v1.method import DEFAULT from google.cloud.bigquery_datatransfer_v1 import StartManualTransferRunsResponse, TransferConfig, TransferRun +from tests_common.test_utils.compat import AIRFLOW_V_3_0_PLUS from airflow.providers.google.cloud.operators.bigquery_dts import ( BigQueryCreateDataTransferOperator, @@ -28,8 +29,6 @@ BigQueryDeleteDataTransferConfigOperator, ) -from dev.tests_common.test_utils.compat import AIRFLOW_V_3_0_PLUS - PROJECT_ID = "id" diff --git a/providers/tests/google/cloud/operators/test_dataprep_system.py b/providers/tests/google/cloud/operators/test_dataprep_system.py index dad77ac4ff806..9706859f02577 100644 --- a/providers/tests/google/cloud/operators/test_dataprep_system.py +++ b/providers/tests/google/cloud/operators/test_dataprep_system.py @@ -21,14 +21,13 @@ import os import pytest +from tests_common.test_utils.db import clear_db_connections +from tests_common.test_utils.gcp_system_helpers import GoogleSystemTest +from tests_common.test_utils.system_tests import get_test_run from airflow.models import Connection from airflow.utils.session import create_session -from dev.tests_common.test_utils.db import clear_db_connections -from dev.tests_common.test_utils.gcp_system_helpers import GoogleSystemTest -from dev.tests_common.test_utils.system_tests import get_test_run - TOKEN = os.environ.get("DATAPREP_TOKEN") EXTRA = {"token": TOKEN} diff --git a/providers/tests/google/cloud/operators/test_dataproc.py b/providers/tests/google/cloud/operators/test_dataproc.py index cf4bffa3a0929..a8b747d564a6f 100644 --- a/providers/tests/google/cloud/operators/test_dataproc.py +++ b/providers/tests/google/cloud/operators/test_dataproc.py @@ -27,6 +27,8 @@ from google.api_core.retry_async import AsyncRetry from google.cloud import dataproc from google.cloud.dataproc_v1 import Batch, Cluster, JobStatus +from tests_common.test_utils.compat import AIRFLOW_V_3_0_PLUS, AIRFLOW_VERSION +from tests_common.test_utils.db import clear_db_runs, clear_db_xcom from airflow.exceptions import ( AirflowException, @@ -80,9 +82,6 @@ from airflow.serialization.serialized_objects import SerializedDAG from airflow.utils.timezone import datetime -from dev.tests_common.test_utils.compat import AIRFLOW_V_3_0_PLUS, AIRFLOW_VERSION -from dev.tests_common.test_utils.db import clear_db_runs, clear_db_xcom - AIRFLOW_VERSION_LABEL = "v" + str(AIRFLOW_VERSION).replace(".", "-").replace("+", "-") cluster_params = inspect.signature(ClusterGenerator.__init__).parameters diff --git a/providers/tests/google/cloud/operators/test_datastore_system.py b/providers/tests/google/cloud/operators/test_datastore_system.py index 8807288358bae..3a9e82241146c 100644 --- a/providers/tests/google/cloud/operators/test_datastore_system.py +++ b/providers/tests/google/cloud/operators/test_datastore_system.py @@ -20,12 +20,12 @@ import os import pytest - -from dev.tests_common.test_utils.gcp_system_helpers import ( +from tests_common.test_utils.gcp_system_helpers import ( CLOUD_DAG_FOLDER, GoogleSystemTest, provide_gcp_context, ) + from providers.tests.google.cloud.utils.gcp_authenticator import GCP_DATASTORE_KEY BUCKET = os.environ.get("GCP_DATASTORE_BUCKET", "datastore-system-test") diff --git a/providers/tests/google/cloud/operators/test_looker.py b/providers/tests/google/cloud/operators/test_looker.py index b368259c503e0..faefc0eca5a08 100644 --- a/providers/tests/google/cloud/operators/test_looker.py +++ b/providers/tests/google/cloud/operators/test_looker.py @@ -20,14 +20,13 @@ from unittest.mock import MagicMock import pytest +from tests_common.test_utils.db import clear_db_runs, clear_db_xcom from airflow.exceptions import AirflowException from airflow.models import DAG, DagBag from airflow.providers.google.cloud.operators.looker import LookerStartPdtBuildOperator from airflow.utils.timezone import datetime -from dev.tests_common.test_utils.db import clear_db_runs, clear_db_xcom - OPERATOR_PATH = "airflow.providers.google.cloud.operators.looker.{}" TASK_ID = "task-id" diff --git a/providers/tests/google/cloud/secrets/test_secret_manager_system.py b/providers/tests/google/cloud/secrets/test_secret_manager_system.py index b9b8b6d0cac82..04b7a9fe1f56f 100644 --- a/providers/tests/google/cloud/secrets/test_secret_manager_system.py +++ b/providers/tests/google/cloud/secrets/test_secret_manager_system.py @@ -22,8 +22,8 @@ from unittest import mock import pytest +from tests_common.test_utils.gcp_system_helpers import GoogleSystemTest, provide_gcp_context -from dev.tests_common.test_utils.gcp_system_helpers import GoogleSystemTest, provide_gcp_context from providers.tests.google.cloud.utils.gcp_authenticator import GCP_SECRET_MANAGER_KEY BACKEND_IMPORT_PATH = "airflow.providers.google.cloud.secrets.secret_manager.CloudSecretManagerBackend" diff --git a/providers/tests/google/cloud/transfers/test_facebook_ads_to_gcs_system.py b/providers/tests/google/cloud/transfers/test_facebook_ads_to_gcs_system.py index 9cb0a9be5264e..4942a36648c21 100644 --- a/providers/tests/google/cloud/transfers/test_facebook_ads_to_gcs_system.py +++ b/providers/tests/google/cloud/transfers/test_facebook_ads_to_gcs_system.py @@ -22,17 +22,17 @@ from contextlib import contextmanager import pytest +from tests_common.test_utils.gcp_system_helpers import ( + GoogleSystemTest, + provide_gcp_context, +) +from tests_common.test_utils.system_tests import get_test_run from airflow.exceptions import AirflowException from airflow.models import Connection from airflow.providers.google.cloud.example_dags import example_facebook_ads_to_gcs from airflow.utils.process_utils import patch_environ -from dev.tests_common.test_utils.gcp_system_helpers import ( - GoogleSystemTest, - provide_gcp_context, -) -from dev.tests_common.test_utils.system_tests import get_test_run from providers.tests.google.cloud.utils.gcp_authenticator import GCP_BIGQUERY_KEY CREDENTIALS_DIR = os.environ.get("CREDENTIALS_DIR", "/files/airflow-breeze-config/keys") diff --git a/providers/tests/google/cloud/transfers/test_salesforce_to_gcs_system.py b/providers/tests/google/cloud/transfers/test_salesforce_to_gcs_system.py index d556f2d86e2f2..e525ca1adde21 100644 --- a/providers/tests/google/cloud/transfers/test_salesforce_to_gcs_system.py +++ b/providers/tests/google/cloud/transfers/test_salesforce_to_gcs_system.py @@ -19,15 +19,15 @@ import os import pytest - -from airflow.providers.google.cloud.example_dags import example_salesforce_to_gcs - -from dev.tests_common.test_utils.gcp_system_helpers import ( +from tests_common.test_utils.gcp_system_helpers import ( GoogleSystemTest, provide_gcp_context, ) -from dev.tests_common.test_utils.salesforce_system_helpers import provide_salesforce_connection -from dev.tests_common.test_utils.system_tests import get_test_run +from tests_common.test_utils.salesforce_system_helpers import provide_salesforce_connection +from tests_common.test_utils.system_tests import get_test_run + +from airflow.providers.google.cloud.example_dags import example_salesforce_to_gcs + from providers.tests.google.cloud.utils.gcp_authenticator import GCP_BIGQUERY_KEY CREDENTIALS_DIR = os.environ.get("CREDENTIALS_DIR", "/files/airflow-breeze-config/keys") diff --git a/providers/tests/google/cloud/utils/gcp_authenticator.py b/providers/tests/google/cloud/utils/gcp_authenticator.py index 6bb11b260644c..36bca98e9a6a7 100644 --- a/providers/tests/google/cloud/utils/gcp_authenticator.py +++ b/providers/tests/google/cloud/utils/gcp_authenticator.py @@ -21,13 +21,13 @@ import os import subprocess +from tests_common.test_utils import AIRFLOW_MAIN_FOLDER +from tests_common.test_utils.logging_command_executor import CommandExecutor + from airflow import settings from airflow.exceptions import AirflowException from airflow.models import Connection -from dev.tests_common.test_utils import AIRFLOW_MAIN_FOLDER -from dev.tests_common.test_utils.logging_command_executor import CommandExecutor - # Please keep these variables in alphabetical order. GCP_AI_KEY = "gcp_ai.json" diff --git a/providers/tests/google/common/auth_backend/test_google_openid.py b/providers/tests/google/common/auth_backend/test_google_openid.py index 67b0ff2003d22..02f08e6107070 100644 --- a/providers/tests/google/common/auth_backend/test_google_openid.py +++ b/providers/tests/google/common/auth_backend/test_google_openid.py @@ -20,14 +20,13 @@ import pytest from google.auth.exceptions import GoogleAuthError +from tests_common.test_utils.compat import AIRFLOW_V_2_9_PLUS +from tests_common.test_utils.config import conf_vars +from tests_common.test_utils.db import clear_db_pools +from tests_common.test_utils.decorators import dont_initialize_flask_app_submodules from airflow.www.app import create_app -from dev.tests_common.test_utils.compat import AIRFLOW_V_2_9_PLUS -from dev.tests_common.test_utils.config import conf_vars -from dev.tests_common.test_utils.db import clear_db_pools -from dev.tests_common.test_utils.decorators import dont_initialize_flask_app_submodules - @pytest.fixture(scope="module") def google_openid_app(): diff --git a/providers/tests/google/marketing_platform/operators/test_display_video_system.py b/providers/tests/google/marketing_platform/operators/test_display_video_system.py index 49f44948abfdf..57e93a0544a15 100644 --- a/providers/tests/google/marketing_platform/operators/test_display_video_system.py +++ b/providers/tests/google/marketing_platform/operators/test_display_video_system.py @@ -17,6 +17,12 @@ from __future__ import annotations import pytest +from tests_common.test_utils.gcp_system_helpers import ( + MARKETING_DAG_FOLDER, + GoogleSystemTest, + provide_gcp_context, +) +from tests_common.test_utils.system_tests import get_test_run from airflow.providers.google.cloud.hooks.bigquery import BigQueryHook from airflow.providers.google.marketing_platform.example_dags.example_display_video import ( @@ -25,12 +31,6 @@ dag_example_display_video_sdf, ) -from dev.tests_common.test_utils.gcp_system_helpers import ( - MARKETING_DAG_FOLDER, - GoogleSystemTest, - provide_gcp_context, -) -from dev.tests_common.test_utils.system_tests import get_test_run from providers.tests.google.cloud.utils.gcp_authenticator import GCP_BIGQUERY_KEY, GMP_KEY # Requires the following scope: diff --git a/providers/tests/hashicorp/hooks/test_vault.py b/providers/tests/hashicorp/hooks/test_vault.py index 442a656d20064..8aa555567bb4c 100644 --- a/providers/tests/hashicorp/hooks/test_vault.py +++ b/providers/tests/hashicorp/hooks/test_vault.py @@ -22,13 +22,12 @@ import pytest from hvac.exceptions import VaultError +from tests_common.test_utils.config import conf_vars from airflow.configuration import AirflowConfigParser from airflow.exceptions import AirflowConfigException from airflow.providers.hashicorp.hooks.vault import VaultHook -from dev.tests_common.test_utils.config import conf_vars - class TestVaultHook: @staticmethod diff --git a/providers/tests/imap/hooks/test_imap.py b/providers/tests/imap/hooks/test_imap.py index 2971cfd1924c6..9d2fcad5c74b3 100644 --- a/providers/tests/imap/hooks/test_imap.py +++ b/providers/tests/imap/hooks/test_imap.py @@ -22,14 +22,13 @@ from unittest.mock import Mock, mock_open, patch import pytest +from tests_common.test_utils.config import conf_vars from airflow.exceptions import AirflowException from airflow.models import Connection from airflow.providers.imap.hooks.imap import ImapHook from airflow.utils import db -from dev.tests_common.test_utils.config import conf_vars - pytestmark = pytest.mark.db_test diff --git a/providers/tests/microsoft/azure/log/test_wasb_task_handler.py b/providers/tests/microsoft/azure/log/test_wasb_task_handler.py index 224961efe4336..2200a65f4d0d7 100644 --- a/providers/tests/microsoft/azure/log/test_wasb_task_handler.py +++ b/providers/tests/microsoft/azure/log/test_wasb_task_handler.py @@ -24,15 +24,14 @@ import pytest from azure.common import AzureHttpError +from tests_common.test_utils.config import conf_vars +from tests_common.test_utils.db import clear_db_dags, clear_db_runs from airflow.providers.microsoft.azure.hooks.wasb import WasbHook from airflow.providers.microsoft.azure.log.wasb_task_handler import WasbTaskHandler from airflow.utils.state import TaskInstanceState from airflow.utils.timezone import datetime -from dev.tests_common.test_utils.config import conf_vars -from dev.tests_common.test_utils.db import clear_db_dags, clear_db_runs - pytestmark = pytest.mark.db_test diff --git a/providers/tests/mongo/hooks/test_mongo.py b/providers/tests/mongo/hooks/test_mongo.py index 78756b0cc4890..9cd5b4f0677d5 100644 --- a/providers/tests/mongo/hooks/test_mongo.py +++ b/providers/tests/mongo/hooks/test_mongo.py @@ -23,13 +23,12 @@ import pymongo import pytest +from tests_common.test_utils.compat import connection_as_json from airflow.exceptions import AirflowConfigException, AirflowProviderDeprecationWarning from airflow.models import Connection from airflow.providers.mongo.hooks.mongo import MongoHook -from dev.tests_common.test_utils.compat import connection_as_json - pytestmark = pytest.mark.db_test if TYPE_CHECKING: diff --git a/providers/tests/mysql/hooks/test_mysql.py b/providers/tests/mysql/hooks/test_mysql.py index 23748ae9cac19..49358ac30dcff 100644 --- a/providers/tests/mysql/hooks/test_mysql.py +++ b/providers/tests/mysql/hooks/test_mysql.py @@ -36,9 +36,9 @@ pytest.skip("MySQL not available", allow_module_level=True) -from airflow.utils import timezone +from tests_common.test_utils.asserts import assert_equal_ignore_multiple_spaces -from dev.tests_common.test_utils.asserts import assert_equal_ignore_multiple_spaces +from airflow.utils import timezone SSL_DICT = {"cert": "/tmp/client-cert.pem", "ca": "/tmp/server-ca.pem", "key": "/tmp/client-key.pem"} diff --git a/providers/tests/openlineage/extractors/test_bash.py b/providers/tests/openlineage/extractors/test_bash.py index d4fcdf7af2b7a..8782ce161c637 100644 --- a/providers/tests/openlineage/extractors/test_bash.py +++ b/providers/tests/openlineage/extractors/test_bash.py @@ -23,13 +23,12 @@ import pytest from openlineage.client.facet_v2 import source_code_job +from tests_common.test_utils.compat import BashOperator from airflow import DAG from airflow.exceptions import AirflowProviderDeprecationWarning from airflow.providers.openlineage.extractors.bash import BashExtractor -from dev.tests_common.test_utils.compat import BashOperator - pytestmark = pytest.mark.db_test with DAG( diff --git a/providers/tests/openlineage/extractors/test_manager.py b/providers/tests/openlineage/extractors/test_manager.py index 6bbf303e32857..dbd4a8e40368c 100644 --- a/providers/tests/openlineage/extractors/test_manager.py +++ b/providers/tests/openlineage/extractors/test_manager.py @@ -24,6 +24,7 @@ import pytest from openlineage.client.event_v2 import Dataset as OpenLineageDataset from openlineage.client.facet_v2 import documentation_dataset, ownership_dataset, schema_dataset +from tests_common.test_utils.compat import AIRFLOW_V_2_10_PLUS from airflow.io.path import ObjectStoragePath from airflow.lineage.entities import Column, File, Table, User @@ -35,8 +36,6 @@ from airflow.providers.openlineage.utils.utils import Asset from airflow.utils.state import State -from dev.tests_common.test_utils.compat import AIRFLOW_V_2_10_PLUS - if TYPE_CHECKING: from airflow.utils.context import Context diff --git a/providers/tests/openlineage/extractors/test_python.py b/providers/tests/openlineage/extractors/test_python.py index ef4fc0b861e7c..92a9d073a1109 100644 --- a/providers/tests/openlineage/extractors/test_python.py +++ b/providers/tests/openlineage/extractors/test_python.py @@ -25,14 +25,13 @@ import pytest from openlineage.client.facet_v2 import source_code_job +from tests_common.test_utils.compat import BashOperator from airflow import DAG from airflow.exceptions import AirflowProviderDeprecationWarning from airflow.operators.python import PythonOperator from airflow.providers.openlineage.extractors.python import PythonExtractor -from dev.tests_common.test_utils.compat import BashOperator - pytestmark = pytest.mark.db_test dag = DAG( diff --git a/providers/tests/openlineage/plugins/test_adapter.py b/providers/tests/openlineage/plugins/test_adapter.py index 88f2250c638ef..8d57fad296279 100644 --- a/providers/tests/openlineage/plugins/test_adapter.py +++ b/providers/tests/openlineage/plugins/test_adapter.py @@ -36,6 +36,8 @@ processing_engine_run, sql_job, ) +from tests_common.test_utils.compat import BashOperator +from tests_common.test_utils.config import conf_vars from airflow import DAG from airflow.models.dagrun import DagRun, DagRunState @@ -52,9 +54,6 @@ from airflow.providers.openlineage.utils.utils import get_airflow_job_facet from airflow.utils.task_group import TaskGroup -from dev.tests_common.test_utils.compat import BashOperator -from dev.tests_common.test_utils.config import conf_vars - pytestmark = pytest.mark.db_test diff --git a/providers/tests/openlineage/plugins/test_execution.py b/providers/tests/openlineage/plugins/test_execution.py index c308047b1bc0d..09262adc4a6f9 100644 --- a/providers/tests/openlineage/plugins/test_execution.py +++ b/providers/tests/openlineage/plugins/test_execution.py @@ -26,6 +26,8 @@ from unittest import mock import pytest +from tests_common.test_utils.compat import AIRFLOW_V_2_10_PLUS, AIRFLOW_V_3_0_PLUS +from tests_common.test_utils.config import conf_vars from airflow.jobs.job import Job from airflow.jobs.local_task_job_runner import LocalTaskJobRunner @@ -37,9 +39,6 @@ from airflow.utils import timezone from airflow.utils.state import State -from dev.tests_common.test_utils.compat import AIRFLOW_V_2_10_PLUS, AIRFLOW_V_3_0_PLUS -from dev.tests_common.test_utils.config import conf_vars - if AIRFLOW_V_3_0_PLUS: from airflow.utils.types import DagRunTriggeredByType diff --git a/providers/tests/openlineage/plugins/test_listener.py b/providers/tests/openlineage/plugins/test_listener.py index 0c1651ccf0277..b859160cf8424 100644 --- a/providers/tests/openlineage/plugins/test_listener.py +++ b/providers/tests/openlineage/plugins/test_listener.py @@ -29,6 +29,8 @@ from openlineage.client import OpenLineageClient from openlineage.client.transport import ConsoleTransport from openlineage.client.transport.console import ConsoleConfig +from tests_common.test_utils.compat import AIRFLOW_V_2_10_PLUS, AIRFLOW_V_3_0_PLUS +from tests_common.test_utils.config import conf_vars from airflow.models import DAG, DagRun, TaskInstance from airflow.models.baseoperator import BaseOperator @@ -39,9 +41,6 @@ from airflow.providers.openlineage.utils.selective_enable import disable_lineage, enable_lineage from airflow.utils.state import DagRunState, State -from dev.tests_common.test_utils.compat import AIRFLOW_V_2_10_PLUS, AIRFLOW_V_3_0_PLUS -from dev.tests_common.test_utils.config import conf_vars - if AIRFLOW_V_3_0_PLUS: from airflow.utils.types import DagRunTriggeredByType diff --git a/providers/tests/openlineage/plugins/test_openlineage.py b/providers/tests/openlineage/plugins/test_openlineage.py index 8685326a29432..e1c36001ebfeb 100644 --- a/providers/tests/openlineage/plugins/test_openlineage.py +++ b/providers/tests/openlineage/plugins/test_openlineage.py @@ -22,9 +22,8 @@ from unittest.mock import patch import pytest - -from dev.tests_common import RUNNING_TESTS_AGAINST_AIRFLOW_PACKAGES -from dev.tests_common.test_utils.config import conf_vars +from tests_common import RUNNING_TESTS_AGAINST_AIRFLOW_PACKAGES +from tests_common.test_utils.config import conf_vars @pytest.mark.skipif( diff --git a/providers/tests/openlineage/plugins/test_utils.py b/providers/tests/openlineage/plugins/test_utils.py index 444839ccaef30..f0685c1351685 100644 --- a/providers/tests/openlineage/plugins/test_utils.py +++ b/providers/tests/openlineage/plugins/test_utils.py @@ -27,6 +27,7 @@ from attrs import define from openlineage.client.utils import RedactMixin from pkg_resources import parse_version +from tests_common.test_utils.compat import AIRFLOW_V_2_10_PLUS, AIRFLOW_V_3_0_PLUS, BashOperator from airflow.models import DAG as AIRFLOW_DAG, DagModel from airflow.providers.openlineage.plugins.facets import AirflowDebugRunFacet @@ -44,8 +45,6 @@ from airflow.utils.log.secrets_masker import _secrets_masker from airflow.utils.state import State -from dev.tests_common.test_utils.compat import AIRFLOW_V_2_10_PLUS, AIRFLOW_V_3_0_PLUS, BashOperator - if AIRFLOW_V_3_0_PLUS: from airflow.utils.types import DagRunTriggeredByType diff --git a/providers/tests/openlineage/test_conf.py b/providers/tests/openlineage/test_conf.py index 7f78a6a4c2eea..b1dd57d4d8415 100644 --- a/providers/tests/openlineage/test_conf.py +++ b/providers/tests/openlineage/test_conf.py @@ -20,6 +20,7 @@ from unittest import mock import pytest +from tests_common.test_utils.config import conf_vars, env_vars from airflow.exceptions import AirflowConfigException from airflow.providers.openlineage.conf import ( @@ -39,8 +40,6 @@ transport, ) -from dev.tests_common.test_utils.config import conf_vars, env_vars - _CONFIG_SECTION = "openlineage" _VAR_CONFIG_PATH = "OPENLINEAGE_CONFIG" _CONFIG_OPTION_CONFIG_PATH = "config_path" diff --git a/providers/tests/openlineage/utils/test_utils.py b/providers/tests/openlineage/utils/test_utils.py index 6cf7904546aba..5adeceb440dc1 100644 --- a/providers/tests/openlineage/utils/test_utils.py +++ b/providers/tests/openlineage/utils/test_utils.py @@ -21,6 +21,9 @@ import pathlib from unittest.mock import MagicMock, patch +from tests_common.test_utils.compat import AIRFLOW_V_2_10_PLUS, BashOperator +from tests_common.test_utils.mock_operators import MockOperator + from airflow import DAG from airflow.decorators import task from airflow.models.baseoperator import BaseOperator @@ -44,9 +47,6 @@ from airflow.utils.task_group import TaskGroup from airflow.utils.types import DagRunType -from dev.tests_common.test_utils.compat import AIRFLOW_V_2_10_PLUS, BashOperator -from dev.tests_common.test_utils.mock_operators import MockOperator - BASH_OPERATOR_PATH = "airflow.providers.standard.operators.bash" if not AIRFLOW_V_2_10_PLUS: BASH_OPERATOR_PATH = "airflow.operators.bash" @@ -191,7 +191,7 @@ def test_get_fully_qualified_class_name_mapped_operator(): mapped = MockOperator.partial(task_id="task_2").expand(arg2=["a", "b", "c"]) assert isinstance(mapped, MappedOperator) mapped_op_path = get_fully_qualified_class_name(mapped) - assert mapped_op_path == "dev.tests_common.test_utils.mock_operators.MockOperator" + assert mapped_op_path == "tests_common.test_utils.mock_operators.MockOperator" def test_get_fully_qualified_class_name_bash_operator(): diff --git a/providers/tests/opensearch/log/test_os_task_handler.py b/providers/tests/opensearch/log/test_os_task_handler.py index 1ffa0f5251191..81ac75c855aa9 100644 --- a/providers/tests/opensearch/log/test_os_task_handler.py +++ b/providers/tests/opensearch/log/test_os_task_handler.py @@ -32,6 +32,8 @@ opensearchpy = pytest.importorskip("opensearchpy") from opensearchpy.exceptions import NotFoundError +from tests_common.test_utils.config import conf_vars +from tests_common.test_utils.db import clear_db_dags, clear_db_runs from airflow.configuration import conf from airflow.providers.opensearch.log.os_response import OpensearchResponse @@ -44,8 +46,6 @@ from airflow.utils.state import DagRunState, TaskInstanceState from airflow.utils.timezone import datetime -from dev.tests_common.test_utils.config import conf_vars -from dev.tests_common.test_utils.db import clear_db_dags, clear_db_runs from providers.tests.opensearch.conftest import MockClient pytestmark = pytest.mark.db_test diff --git a/providers/tests/redis/log/test_redis_task_handler.py b/providers/tests/redis/log/test_redis_task_handler.py index bc7345df9a53b..0d83f3a303136 100644 --- a/providers/tests/redis/log/test_redis_task_handler.py +++ b/providers/tests/redis/log/test_redis_task_handler.py @@ -21,6 +21,7 @@ from unittest.mock import patch import pytest +from tests_common.test_utils.config import conf_vars from airflow.models import DAG, DagRun, TaskInstance from airflow.operators.empty import EmptyOperator @@ -29,8 +30,6 @@ from airflow.utils.state import State from airflow.utils.timezone import datetime -from dev.tests_common.test_utils.config import conf_vars - pytestmark = pytest.mark.db_test diff --git a/providers/tests/sftp/operators/test_sftp.py b/providers/tests/sftp/operators/test_sftp.py index e6c90c2c74f5d..9d5689c881485 100644 --- a/providers/tests/sftp/operators/test_sftp.py +++ b/providers/tests/sftp/operators/test_sftp.py @@ -25,6 +25,7 @@ import paramiko import pytest +from tests_common.test_utils.config import conf_vars from airflow.exceptions import AirflowException, AirflowProviderDeprecationWarning from airflow.models import DAG, Connection @@ -36,8 +37,6 @@ from airflow.utils import timezone from airflow.utils.timezone import datetime -from dev.tests_common.test_utils.config import conf_vars - pytestmark = pytest.mark.db_test diff --git a/providers/tests/smtp/hooks/test_smtp.py b/providers/tests/smtp/hooks/test_smtp.py index 04a20e0ca6f0a..fe9471c424933 100644 --- a/providers/tests/smtp/hooks/test_smtp.py +++ b/providers/tests/smtp/hooks/test_smtp.py @@ -25,14 +25,13 @@ from unittest.mock import Mock, patch import pytest +from tests_common.test_utils.config import conf_vars from airflow.models import Connection from airflow.providers.smtp.hooks.smtp import SmtpHook from airflow.utils import db from airflow.utils.session import create_session -from dev.tests_common.test_utils.config import conf_vars - pytestmark = pytest.mark.db_test diff --git a/providers/tests/smtp/notifications/test_smtp.py b/providers/tests/smtp/notifications/test_smtp.py index 75e1ebf530fae..594fa19dfee34 100644 --- a/providers/tests/smtp/notifications/test_smtp.py +++ b/providers/tests/smtp/notifications/test_smtp.py @@ -21,6 +21,8 @@ from unittest import mock import pytest +from tests_common.test_utils.compat import AIRFLOW_V_2_10_PLUS +from tests_common.test_utils.config import conf_vars from airflow.configuration import conf from airflow.models import SlaMiss @@ -32,9 +34,6 @@ ) from airflow.utils import timezone -from dev.tests_common.test_utils.compat import AIRFLOW_V_2_10_PLUS -from dev.tests_common.test_utils.config import conf_vars - pytestmark = pytest.mark.db_test SMTP_API_DEFAULT_CONN_ID = SmtpHook.default_conn_name diff --git a/providers/tests/ssh/operators/test_ssh.py b/providers/tests/ssh/operators/test_ssh.py index b304a24882bb9..55431bd3b629e 100644 --- a/providers/tests/ssh/operators/test_ssh.py +++ b/providers/tests/ssh/operators/test_ssh.py @@ -24,6 +24,7 @@ import pytest from paramiko.client import SSHClient +from tests_common.test_utils.config import conf_vars from airflow.exceptions import AirflowException, AirflowSkipException, AirflowTaskTimeout from airflow.models import TaskInstance @@ -32,8 +33,6 @@ from airflow.utils.timezone import datetime from airflow.utils.types import NOTSET -from dev.tests_common.test_utils.config import conf_vars - pytestmark = pytest.mark.db_test diff --git a/providers/tests/standard/operators/test_bash.py b/providers/tests/standard/operators/test_bash.py index 305651ee596ae..f040442ecccd3 100644 --- a/providers/tests/standard/operators/test_bash.py +++ b/providers/tests/standard/operators/test_bash.py @@ -26,6 +26,7 @@ from unittest import mock import pytest +from tests_common.test_utils.compat import AIRFLOW_V_3_0_PLUS from airflow.exceptions import AirflowException, AirflowSkipException, AirflowTaskTimeout from airflow.providers.standard.operators.bash import BashOperator @@ -33,8 +34,6 @@ from airflow.utils.state import State from airflow.utils.types import DagRunType -from dev.tests_common.test_utils.compat import AIRFLOW_V_3_0_PLUS - if AIRFLOW_V_3_0_PLUS: from airflow.utils.types import DagRunTriggeredByType diff --git a/providers/tests/standard/operators/test_datetime.py b/providers/tests/standard/operators/test_datetime.py index 4fbb0863d35ae..da7f98f0e3543 100644 --- a/providers/tests/standard/operators/test_datetime.py +++ b/providers/tests/standard/operators/test_datetime.py @@ -21,6 +21,7 @@ import pytest import time_machine +from tests_common.test_utils.compat import AIRFLOW_V_3_0_PLUS from airflow.exceptions import AirflowException from airflow.models.dagrun import DagRun @@ -31,8 +32,6 @@ from airflow.utils.session import create_session from airflow.utils.state import State -from dev.tests_common.test_utils.compat import AIRFLOW_V_3_0_PLUS - if AIRFLOW_V_3_0_PLUS: from airflow.utils.types import DagRunTriggeredByType diff --git a/providers/tests/standard/operators/test_weekday.py b/providers/tests/standard/operators/test_weekday.py index 6c20299d15e79..576fd10b54542 100644 --- a/providers/tests/standard/operators/test_weekday.py +++ b/providers/tests/standard/operators/test_weekday.py @@ -21,6 +21,7 @@ import pytest import time_machine +from tests_common.test_utils.compat import AIRFLOW_V_3_0_PLUS from airflow.exceptions import AirflowException from airflow.models.dagrun import DagRun @@ -33,8 +34,6 @@ from airflow.utils.state import State from airflow.utils.weekday import WeekDay -from dev.tests_common.test_utils.compat import AIRFLOW_V_3_0_PLUS - if AIRFLOW_V_3_0_PLUS: from airflow.utils.types import DagRunTriggeredByType diff --git a/providers/tests/standard/sensors/test_weekday.py b/providers/tests/standard/sensors/test_weekday.py index ef0091a9fdd3a..5bdbf4bb79c81 100644 --- a/providers/tests/standard/sensors/test_weekday.py +++ b/providers/tests/standard/sensors/test_weekday.py @@ -20,6 +20,7 @@ from datetime import timedelta import pytest +from tests_common.test_utils import db from airflow.exceptions import AirflowSensorTimeout from airflow.models import DagBag @@ -28,8 +29,6 @@ from airflow.utils.timezone import datetime from airflow.utils.weekday import WeekDay -from dev.tests_common.test_utils import db - pytestmark = pytest.mark.db_test diff --git a/providers/tests/system/airbyte/example_airbyte_trigger_job.py b/providers/tests/system/airbyte/example_airbyte_trigger_job.py index 1dd3f01d72618..240a293bbd71b 100644 --- a/providers/tests/system/airbyte/example_airbyte_trigger_job.py +++ b/providers/tests/system/airbyte/example_airbyte_trigger_job.py @@ -61,7 +61,7 @@ # Task dependency created via `XComArgs`: # async_source_destination >> airbyte_sensor -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/alibaba/example_adb_spark_batch.py b/providers/tests/system/alibaba/example_adb_spark_batch.py index 35e03a088871d..e8447cefc4b58 100644 --- a/providers/tests/system/alibaba/example_adb_spark_batch.py +++ b/providers/tests/system/alibaba/example_adb_spark_batch.py @@ -50,14 +50,14 @@ spark_pi >> spark_lr - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() # [END howto_operator_adb_spark_batch] -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/alibaba/example_adb_spark_sql.py b/providers/tests/system/alibaba/example_adb_spark_sql.py index ac29330d451db..cc587e424b2b4 100644 --- a/providers/tests/system/alibaba/example_adb_spark_sql.py +++ b/providers/tests/system/alibaba/example_adb_spark_sql.py @@ -42,14 +42,14 @@ show_databases >> show_tables - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() # [END howto_operator_adb_spark_sql] -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/alibaba/example_oss_bucket.py b/providers/tests/system/alibaba/example_oss_bucket.py index 4870a3b577977..cfe7a42efc55d 100644 --- a/providers/tests/system/alibaba/example_oss_bucket.py +++ b/providers/tests/system/alibaba/example_oss_bucket.py @@ -41,14 +41,14 @@ create_bucket >> delete_bucket - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() # [END howto_operator_oss_bucket] -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/alibaba/example_oss_object.py b/providers/tests/system/alibaba/example_oss_object.py index 7305c05bf8384..dfa59917fd6b0 100644 --- a/providers/tests/system/alibaba/example_oss_object.py +++ b/providers/tests/system/alibaba/example_oss_object.py @@ -65,14 +65,14 @@ create_object >> download_object >> delete_object >> delete_batch_object - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/amazon/CONTRIBUTING.md b/providers/tests/system/amazon/CONTRIBUTING.md index f12062aa7fb59..4abdf410dd63d 100644 --- a/providers/tests/system/amazon/CONTRIBUTING.md +++ b/providers/tests/system/amazon/CONTRIBUTING.md @@ -212,7 +212,7 @@ chain( task2, # task2 has trigger rule "all done" defined ) -from dev.tests_common.test_utils.watcher import watcher +from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG diff --git a/providers/tests/system/amazon/aws/example_appflow.py b/providers/tests/system/amazon/aws/example_appflow.py index db9dd9a428947..262b6cb803d44 100644 --- a/providers/tests/system/amazon/aws/example_appflow.py +++ b/providers/tests/system/amazon/aws/example_appflow.py @@ -111,13 +111,13 @@ should_be_skipped, ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/amazon/aws/example_appflow_run.py b/providers/tests/system/amazon/aws/example_appflow_run.py index d1151d1dd5c8b..106fda1bb7a42 100644 --- a/providers/tests/system/amazon/aws/example_appflow_run.py +++ b/providers/tests/system/amazon/aws/example_appflow_run.py @@ -193,13 +193,13 @@ def delete_flow(flow_name: str): delete_bucket, ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/amazon/aws/example_athena.py b/providers/tests/system/amazon/aws/example_athena.py index 2ee1c11ab7881..201e017d12a64 100644 --- a/providers/tests/system/amazon/aws/example_athena.py +++ b/providers/tests/system/amazon/aws/example_athena.py @@ -174,14 +174,14 @@ def read_results_from_s3(bucket_name, query_execution_id): delete_s3_bucket, ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/amazon/aws/example_azure_blob_to_s3.py b/providers/tests/system/amazon/aws/example_azure_blob_to_s3.py index 78a55a6a7f7dc..3834365622d30 100644 --- a/providers/tests/system/amazon/aws/example_azure_blob_to_s3.py +++ b/providers/tests/system/amazon/aws/example_azure_blob_to_s3.py @@ -72,13 +72,13 @@ delete_s3_bucket, ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/amazon/aws/example_batch.py b/providers/tests/system/amazon/aws/example_batch.py index da035050a77b4..828815a2e1c86 100644 --- a/providers/tests/system/amazon/aws/example_batch.py +++ b/providers/tests/system/amazon/aws/example_batch.py @@ -283,13 +283,13 @@ def delete_job_queue(job_queue_name): log_cleanup, ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/amazon/aws/example_bedrock.py b/providers/tests/system/amazon/aws/example_bedrock.py index 8e67ee4d3880b..3caa9f3a35398 100644 --- a/providers/tests/system/amazon/aws/example_bedrock.py +++ b/providers/tests/system/amazon/aws/example_bedrock.py @@ -218,14 +218,14 @@ def run_or_skip(): delete_bucket, ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/amazon/aws/example_bedrock_retrieve_and_generate.py b/providers/tests/system/amazon/aws/example_bedrock_retrieve_and_generate.py index 0d9eb278460f8..094cb854c3a4f 100644 --- a/providers/tests/system/amazon/aws/example_bedrock_retrieve_and_generate.py +++ b/providers/tests/system/amazon/aws/example_bedrock_retrieve_and_generate.py @@ -594,14 +594,14 @@ def delete_opensearch_policies(collection_name: str): delete_bucket, ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/amazon/aws/example_cloudformation.py b/providers/tests/system/amazon/aws/example_cloudformation.py index 38827eebbdb5f..7553f5d9bd0a3 100644 --- a/providers/tests/system/amazon/aws/example_cloudformation.py +++ b/providers/tests/system/amazon/aws/example_cloudformation.py @@ -108,14 +108,14 @@ wait_for_stack_delete, ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/amazon/aws/example_comprehend.py b/providers/tests/system/amazon/aws/example_comprehend.py index d8a1f9af88b6c..a4e3bdd4852ef 100644 --- a/providers/tests/system/amazon/aws/example_comprehend.py +++ b/providers/tests/system/amazon/aws/example_comprehend.py @@ -126,13 +126,13 @@ def pii_entities_detection_job_workflow(): delete_bucket, ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/amazon/aws/example_comprehend_document_classifier.py b/providers/tests/system/amazon/aws/example_comprehend_document_classifier.py index f5308265a83ca..160e3f3cadf84 100644 --- a/providers/tests/system/amazon/aws/example_comprehend_document_classifier.py +++ b/providers/tests/system/amazon/aws/example_comprehend_document_classifier.py @@ -231,13 +231,13 @@ def delete_connection(conn_id): delete_bucket, ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/amazon/aws/example_datasync.py b/providers/tests/system/amazon/aws/example_datasync.py index a8363fe81b36e..8d25fcf9c3989 100644 --- a/providers/tests/system/amazon/aws/example_datasync.py +++ b/providers/tests/system/amazon/aws/example_datasync.py @@ -235,13 +235,13 @@ def delete_locations(locations): delete_s3_bucket_destination, ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/amazon/aws/example_dms.py b/providers/tests/system/amazon/aws/example_dms.py index b2e99daf6290f..5d15aa0c4ecb0 100644 --- a/providers/tests/system/amazon/aws/example_dms.py +++ b/providers/tests/system/amazon/aws/example_dms.py @@ -429,13 +429,13 @@ def delete_security_group(security_group_id: str, security_group_name: str): delete_s3_bucket, ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/amazon/aws/example_dynamodb.py b/providers/tests/system/amazon/aws/example_dynamodb.py index 3d709c36b02ad..3cfa15ecaa36e 100644 --- a/providers/tests/system/amazon/aws/example_dynamodb.py +++ b/providers/tests/system/amazon/aws/example_dynamodb.py @@ -117,14 +117,14 @@ def delete_table(table_name: str): delete_table, ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/amazon/aws/example_dynamodb_to_s3.py b/providers/tests/system/amazon/aws/example_dynamodb_to_s3.py index 86a5d76c9587f..989fe79b2d9f6 100644 --- a/providers/tests/system/amazon/aws/example_dynamodb_to_s3.py +++ b/providers/tests/system/amazon/aws/example_dynamodb_to_s3.py @@ -256,13 +256,13 @@ def skip_incremental_export(start_time: datetime, end_time: datetime): delete_table, delete_bucket, ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/amazon/aws/example_ec2.py b/providers/tests/system/amazon/aws/example_ec2.py index e55adab775ffd..750ec19c27779 100644 --- a/providers/tests/system/amazon/aws/example_ec2.py +++ b/providers/tests/system/amazon/aws/example_ec2.py @@ -202,13 +202,13 @@ def parse_response(instance_ids: list): delete_key_pair(key_name), ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/amazon/aws/example_ecs.py b/providers/tests/system/amazon/aws/example_ecs.py index e1aad99b5e7cb..0f9118ae34af3 100644 --- a/providers/tests/system/amazon/aws/example_ecs.py +++ b/providers/tests/system/amazon/aws/example_ecs.py @@ -212,14 +212,14 @@ def clean_logs(group_name: str): clean_logs(log_group_name), ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/amazon/aws/example_ecs_fargate.py b/providers/tests/system/amazon/aws/example_ecs_fargate.py index ca592234aa77f..df3afbce7df71 100644 --- a/providers/tests/system/amazon/aws/example_ecs_fargate.py +++ b/providers/tests/system/amazon/aws/example_ecs_fargate.py @@ -156,13 +156,13 @@ def delete_cluster(cluster_name: str) -> None: delete_cluster(cluster_name), ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/amazon/aws/example_eks_templated.py b/providers/tests/system/amazon/aws/example_eks_templated.py index 3b1ba5059725a..de4d5e621ef0a 100644 --- a/providers/tests/system/amazon/aws/example_eks_templated.py +++ b/providers/tests/system/amazon/aws/example_eks_templated.py @@ -148,13 +148,13 @@ await_delete_cluster, ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/amazon/aws/example_eks_with_fargate_in_one_step.py b/providers/tests/system/amazon/aws/example_eks_with_fargate_in_one_step.py index 27ee2be0d728a..a267463c11f3d 100644 --- a/providers/tests/system/amazon/aws/example_eks_with_fargate_in_one_step.py +++ b/providers/tests/system/amazon/aws/example_eks_with_fargate_in_one_step.py @@ -141,14 +141,14 @@ await_delete_cluster, ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/amazon/aws/example_eks_with_fargate_profile.py b/providers/tests/system/amazon/aws/example_eks_with_fargate_profile.py index 34cbed1645fa5..1348b352cc51f 100644 --- a/providers/tests/system/amazon/aws/example_eks_with_fargate_profile.py +++ b/providers/tests/system/amazon/aws/example_eks_with_fargate_profile.py @@ -175,13 +175,13 @@ await_delete_cluster, ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/amazon/aws/example_eks_with_nodegroup_in_one_step.py b/providers/tests/system/amazon/aws/example_eks_with_nodegroup_in_one_step.py index 11f843688524c..07538d94d17b3 100644 --- a/providers/tests/system/amazon/aws/example_eks_with_nodegroup_in_one_step.py +++ b/providers/tests/system/amazon/aws/example_eks_with_nodegroup_in_one_step.py @@ -155,14 +155,14 @@ def delete_launch_template(template_name: str): delete_launch_template(launch_template_name), ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/amazon/aws/example_eks_with_nodegroups.py b/providers/tests/system/amazon/aws/example_eks_with_nodegroups.py index 8356a8ee4375c..98448767d9745 100644 --- a/providers/tests/system/amazon/aws/example_eks_with_nodegroups.py +++ b/providers/tests/system/amazon/aws/example_eks_with_nodegroups.py @@ -198,14 +198,14 @@ def delete_launch_template(template_name: str): delete_launch_template(launch_template_name), ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/amazon/aws/example_emr.py b/providers/tests/system/amazon/aws/example_emr.py index 44c28630eb69e..9a29667b5d098 100644 --- a/providers/tests/system/amazon/aws/example_emr.py +++ b/providers/tests/system/amazon/aws/example_emr.py @@ -227,14 +227,14 @@ def get_step_id(step_ids: list): ] ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/amazon/aws/example_emr_eks.py b/providers/tests/system/amazon/aws/example_emr_eks.py index d95645fd306a6..cafaf09ed7473 100644 --- a/providers/tests/system/amazon/aws/example_emr_eks.py +++ b/providers/tests/system/amazon/aws/example_emr_eks.py @@ -320,13 +320,13 @@ def delete_virtual_cluster(virtual_cluster_id): delete_bucket, ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/amazon/aws/example_emr_notebook_execution.py b/providers/tests/system/amazon/aws/example_emr_notebook_execution.py index 48d2b14c96573..681e97048aa58 100644 --- a/providers/tests/system/amazon/aws/example_emr_notebook_execution.py +++ b/providers/tests/system/amazon/aws/example_emr_notebook_execution.py @@ -112,13 +112,13 @@ wait_for_execution_finish, ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/amazon/aws/example_emr_serverless.py b/providers/tests/system/amazon/aws/example_emr_serverless.py index 4901fa6736059..9059f0e1b1e02 100644 --- a/providers/tests/system/amazon/aws/example_emr_serverless.py +++ b/providers/tests/system/amazon/aws/example_emr_serverless.py @@ -155,13 +155,13 @@ delete_s3_bucket, ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/amazon/aws/example_eventbridge.py b/providers/tests/system/amazon/aws/example_eventbridge.py index 5470bd0ca70cc..6f31fc9ce37d8 100644 --- a/providers/tests/system/amazon/aws/example_eventbridge.py +++ b/providers/tests/system/amazon/aws/example_eventbridge.py @@ -81,7 +81,7 @@ chain(test_context, put_events, put_rule, enable_rule, disable_rule) -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/amazon/aws/example_ftp_to_s3.py b/providers/tests/system/amazon/aws/example_ftp_to_s3.py index 98a37e197f8fe..b3e0d2ccf43f5 100644 --- a/providers/tests/system/amazon/aws/example_ftp_to_s3.py +++ b/providers/tests/system/amazon/aws/example_ftp_to_s3.py @@ -72,13 +72,13 @@ delete_s3_bucket, ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/amazon/aws/example_gcs_to_s3.py b/providers/tests/system/amazon/aws/example_gcs_to_s3.py index 97ed8dfda3a98..5257b440808e9 100644 --- a/providers/tests/system/amazon/aws/example_gcs_to_s3.py +++ b/providers/tests/system/amazon/aws/example_gcs_to_s3.py @@ -115,13 +115,13 @@ def upload_gcs_file(bucket_name: str, object_name: str, user_project: str): delete_gcs_bucket, ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/amazon/aws/example_glacier_to_gcs.py b/providers/tests/system/amazon/aws/example_glacier_to_gcs.py index 28c061ae057c9..9281d3c92e1a0 100644 --- a/providers/tests/system/amazon/aws/example_glacier_to_gcs.py +++ b/providers/tests/system/amazon/aws/example_glacier_to_gcs.py @@ -108,13 +108,13 @@ def delete_vault(vault_name): delete_vault(vault_name), ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/amazon/aws/example_glue.py b/providers/tests/system/amazon/aws/example_glue.py index 5314d26eff80c..3d042c79d44cb 100644 --- a/providers/tests/system/amazon/aws/example_glue.py +++ b/providers/tests/system/amazon/aws/example_glue.py @@ -217,13 +217,13 @@ def glue_cleanup(crawler_name: str, job_name: str, db_name: str) -> None: log_cleanup, ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/amazon/aws/example_glue_data_quality.py b/providers/tests/system/amazon/aws/example_glue_data_quality.py index 4d05d6e22b436..3c1bdb378b5dc 100644 --- a/providers/tests/system/amazon/aws/example_glue_data_quality.py +++ b/providers/tests/system/amazon/aws/example_glue_data_quality.py @@ -198,13 +198,13 @@ def delete_ruleset(ruleset_name): delete_s3_bucket, ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/amazon/aws/example_glue_data_quality_with_recommendation.py b/providers/tests/system/amazon/aws/example_glue_data_quality_with_recommendation.py index fdb3cb8e63ad8..a0dd4ebba7b56 100644 --- a/providers/tests/system/amazon/aws/example_glue_data_quality_with_recommendation.py +++ b/providers/tests/system/amazon/aws/example_glue_data_quality_with_recommendation.py @@ -197,13 +197,13 @@ def delete_ruleset(ruleset_name): delete_s3_bucket, ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/amazon/aws/example_glue_databrew.py b/providers/tests/system/amazon/aws/example_glue_databrew.py index 3218b465c290e..95799666f46e4 100644 --- a/providers/tests/system/amazon/aws/example_glue_databrew.py +++ b/providers/tests/system/amazon/aws/example_glue_databrew.py @@ -155,14 +155,14 @@ def delete_job(job_name: str): delete_output_bucket, ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/amazon/aws/example_google_api_sheets_to_s3.py b/providers/tests/system/amazon/aws/example_google_api_sheets_to_s3.py index 7ea7ae9d072f7..24a4eba54d59b 100644 --- a/providers/tests/system/amazon/aws/example_google_api_sheets_to_s3.py +++ b/providers/tests/system/amazon/aws/example_google_api_sheets_to_s3.py @@ -83,13 +83,13 @@ delete_s3_bucket, ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/amazon/aws/example_google_api_youtube_to_s3.py b/providers/tests/system/amazon/aws/example_google_api_youtube_to_s3.py index ae4f721567cec..3d5ff917bfc0a 100644 --- a/providers/tests/system/amazon/aws/example_google_api_youtube_to_s3.py +++ b/providers/tests/system/amazon/aws/example_google_api_youtube_to_s3.py @@ -197,13 +197,13 @@ def transform_video_ids(**kwargs): delete_s3_bucket, ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/amazon/aws/example_hive_to_dynamodb.py b/providers/tests/system/amazon/aws/example_hive_to_dynamodb.py index 5582c13b855f5..0c0978361bab7 100644 --- a/providers/tests/system/amazon/aws/example_hive_to_dynamodb.py +++ b/providers/tests/system/amazon/aws/example_hive_to_dynamodb.py @@ -150,13 +150,13 @@ def configure_hive_connection(connection_id, hostname): delete_dynamodb_table(dynamodb_table_name), ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/amazon/aws/example_http_to_s3.py b/providers/tests/system/amazon/aws/example_http_to_s3.py index cfbc131ee5689..612d68ef36e0c 100644 --- a/providers/tests/system/amazon/aws/example_http_to_s3.py +++ b/providers/tests/system/amazon/aws/example_http_to_s3.py @@ -119,13 +119,13 @@ def create_connection(conn_id_name: str): delete_s3_bucket, ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/amazon/aws/example_imap_attachment_to_s3.py b/providers/tests/system/amazon/aws/example_imap_attachment_to_s3.py index b43023115cf4d..c376778b0df3a 100644 --- a/providers/tests/system/amazon/aws/example_imap_attachment_to_s3.py +++ b/providers/tests/system/amazon/aws/example_imap_attachment_to_s3.py @@ -90,13 +90,13 @@ delete_s3_bucket, ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/amazon/aws/example_kinesis_analytics.py b/providers/tests/system/amazon/aws/example_kinesis_analytics.py index 600710cc43b4b..b4d4566fc7600 100644 --- a/providers/tests/system/amazon/aws/example_kinesis_analytics.py +++ b/providers/tests/system/amazon/aws/example_kinesis_analytics.py @@ -263,13 +263,13 @@ def delete_kinesis_stream(stream: str, region: str): delete_bucket, ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/amazon/aws/example_lambda.py b/providers/tests/system/amazon/aws/example_lambda.py index fd346a34589f0..767fae86387fd 100644 --- a/providers/tests/system/amazon/aws/example_lambda.py +++ b/providers/tests/system/amazon/aws/example_lambda.py @@ -129,13 +129,13 @@ def delete_lambda(function_name: str): log_cleanup, ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/amazon/aws/example_local_to_s3.py b/providers/tests/system/amazon/aws/example_local_to_s3.py index 47344c429b958..cdd9748974433 100644 --- a/providers/tests/system/amazon/aws/example_local_to_s3.py +++ b/providers/tests/system/amazon/aws/example_local_to_s3.py @@ -91,14 +91,14 @@ def delete_temp_file(): delete_temp_file(), ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/amazon/aws/example_mongo_to_s3.py b/providers/tests/system/amazon/aws/example_mongo_to_s3.py index 3e5bc318e5c17..6fa5f612b0681 100644 --- a/providers/tests/system/amazon/aws/example_mongo_to_s3.py +++ b/providers/tests/system/amazon/aws/example_mongo_to_s3.py @@ -83,13 +83,13 @@ delete_s3_bucket, ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/amazon/aws/example_neptune.py b/providers/tests/system/amazon/aws/example_neptune.py index 4685840b42594..7682a65b65d6d 100644 --- a/providers/tests/system/amazon/aws/example_neptune.py +++ b/providers/tests/system/amazon/aws/example_neptune.py @@ -77,13 +77,13 @@ def delete_cluster(cluster_id): # TEST TEARDOWN delete_cluster(cluster_id), ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/amazon/aws/example_quicksight.py b/providers/tests/system/amazon/aws/example_quicksight.py index ec5cd38003148..eb53ffe60e012 100644 --- a/providers/tests/system/amazon/aws/example_quicksight.py +++ b/providers/tests/system/amazon/aws/example_quicksight.py @@ -218,13 +218,13 @@ def delete_ingestion(aws_account_id: str, dataset_name: str, ingestion_name: str delete_bucket, ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/amazon/aws/example_rds_event.py b/providers/tests/system/amazon/aws/example_rds_event.py index 79d70c9d394e2..58ab603326b96 100644 --- a/providers/tests/system/amazon/aws/example_rds_event.py +++ b/providers/tests/system/amazon/aws/example_rds_event.py @@ -119,14 +119,14 @@ def delete_sns_topic(topic_arn) -> None: delete_sns_topic(sns_topic), ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/amazon/aws/example_rds_export.py b/providers/tests/system/amazon/aws/example_rds_export.py index 34638f030f506..756105d802740 100644 --- a/providers/tests/system/amazon/aws/example_rds_export.py +++ b/providers/tests/system/amazon/aws/example_rds_export.py @@ -178,13 +178,13 @@ def get_snapshot_arn(snapshot_name: str) -> str: delete_db_instance, ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/amazon/aws/example_rds_instance.py b/providers/tests/system/amazon/aws/example_rds_instance.py index ce49f73c1f4ae..b2a9e7482e7d0 100644 --- a/providers/tests/system/amazon/aws/example_rds_instance.py +++ b/providers/tests/system/amazon/aws/example_rds_instance.py @@ -111,14 +111,14 @@ delete_db_instance, ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/amazon/aws/example_rds_snapshot.py b/providers/tests/system/amazon/aws/example_rds_snapshot.py index c58c1db54d539..b6b0c468e589b 100644 --- a/providers/tests/system/amazon/aws/example_rds_snapshot.py +++ b/providers/tests/system/amazon/aws/example_rds_snapshot.py @@ -138,14 +138,14 @@ delete_db_instance, ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/amazon/aws/example_redshift.py b/providers/tests/system/amazon/aws/example_redshift.py index 986bce5a07b52..146a20da451ba 100644 --- a/providers/tests/system/amazon/aws/example_redshift.py +++ b/providers/tests/system/amazon/aws/example_redshift.py @@ -248,13 +248,13 @@ delete_cluster_snapshot, ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/amazon/aws/example_redshift_s3_transfers.py b/providers/tests/system/amazon/aws/example_redshift_s3_transfers.py index 2a553eae8cb60..536f9b97157dc 100644 --- a/providers/tests/system/amazon/aws/example_redshift_s3_transfers.py +++ b/providers/tests/system/amazon/aws/example_redshift_s3_transfers.py @@ -318,13 +318,13 @@ def _insert_data(table_name: str) -> str: delete_cluster, ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/amazon/aws/example_s3.py b/providers/tests/system/amazon/aws/example_s3.py index d016076022874..a9c93fdd5bebe 100644 --- a/providers/tests/system/amazon/aws/example_s3.py +++ b/providers/tests/system/amazon/aws/example_s3.py @@ -323,13 +323,13 @@ def check_fn(files: list, **kwargs) -> bool: delete_bucket, delete_bucket_2, ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/amazon/aws/example_s3_to_dynamodb.py b/providers/tests/system/amazon/aws/example_s3_to_dynamodb.py index efd762cfd93c1..4bc4fa6b9393e 100644 --- a/providers/tests/system/amazon/aws/example_s3_to_dynamodb.py +++ b/providers/tests/system/amazon/aws/example_s3_to_dynamodb.py @@ -181,13 +181,13 @@ def delete_dynamodb_table(table_name: str): delete_new_table, delete_bucket, ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/amazon/aws/example_s3_to_ftp.py b/providers/tests/system/amazon/aws/example_s3_to_ftp.py index 0ffb4722ba867..4dd134f95c3f8 100644 --- a/providers/tests/system/amazon/aws/example_s3_to_ftp.py +++ b/providers/tests/system/amazon/aws/example_s3_to_ftp.py @@ -71,13 +71,13 @@ delete_s3_bucket, ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/amazon/aws/example_s3_to_sftp.py b/providers/tests/system/amazon/aws/example_s3_to_sftp.py index 5270d3ec7d4b9..dc7d010628679 100644 --- a/providers/tests/system/amazon/aws/example_s3_to_sftp.py +++ b/providers/tests/system/amazon/aws/example_s3_to_sftp.py @@ -71,13 +71,13 @@ delete_s3_bucket, ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/amazon/aws/example_s3_to_sql.py b/providers/tests/system/amazon/aws/example_s3_to_sql.py index e7e8a5e9543cf..d7f452bfeb087 100644 --- a/providers/tests/system/amazon/aws/example_s3_to_sql.py +++ b/providers/tests/system/amazon/aws/example_s3_to_sql.py @@ -18,6 +18,8 @@ from datetime import datetime +from tests_common.test_utils.watcher import watcher + from airflow import settings from airflow.decorators import task from airflow.models import Connection @@ -40,7 +42,6 @@ from airflow.providers.common.sql.operators.sql import SQLTableCheckOperator from airflow.utils.trigger_rule import TriggerRule -from dev.tests_common.test_utils.watcher import watcher from providers.tests.system.amazon.aws.utils import ENV_ID_KEY, SystemTestContextBuilder # Externally fetched variables: @@ -254,7 +255,7 @@ def parse_csv_to_generator(filepath): list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/amazon/aws/example_sagemaker.py b/providers/tests/system/amazon/aws/example_sagemaker.py index acb05400b951e..96e9756659975 100644 --- a/providers/tests/system/amazon/aws/example_sagemaker.py +++ b/providers/tests/system/amazon/aws/example_sagemaker.py @@ -646,13 +646,13 @@ def delete_docker_image(image_name): log_cleanup, ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/amazon/aws/example_sagemaker_endpoint.py b/providers/tests/system/amazon/aws/example_sagemaker_endpoint.py index fecaa92264b6e..165e5d5edd444 100644 --- a/providers/tests/system/amazon/aws/example_sagemaker_endpoint.py +++ b/providers/tests/system/amazon/aws/example_sagemaker_endpoint.py @@ -291,13 +291,13 @@ def set_up(env_id, role_arn, ti=None): archive_logs(f"/aws/sagemaker/Endpoints/{test_setup['endpoint_name']}"), ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/amazon/aws/example_sagemaker_notebook.py b/providers/tests/system/amazon/aws/example_sagemaker_notebook.py index 76d35dc2b1479..e989be7a92e5f 100644 --- a/providers/tests/system/amazon/aws/example_sagemaker_notebook.py +++ b/providers/tests/system/amazon/aws/example_sagemaker_notebook.py @@ -97,13 +97,13 @@ delete_instance, ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/amazon/aws/example_sagemaker_pipeline.py b/providers/tests/system/amazon/aws/example_sagemaker_pipeline.py index 614fb5c13cc9e..9c0c9d7284837 100644 --- a/providers/tests/system/amazon/aws/example_sagemaker_pipeline.py +++ b/providers/tests/system/amazon/aws/example_sagemaker_pipeline.py @@ -117,13 +117,13 @@ def delete_pipeline(name: str): delete_experiments([pipeline_name]), ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/amazon/aws/example_salesforce_to_s3.py b/providers/tests/system/amazon/aws/example_salesforce_to_s3.py index 7ee15f7030beb..a533c8c3fbbf3 100644 --- a/providers/tests/system/amazon/aws/example_salesforce_to_s3.py +++ b/providers/tests/system/amazon/aws/example_salesforce_to_s3.py @@ -78,13 +78,13 @@ delete_s3_bucket, ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/amazon/aws/example_sftp_to_s3.py b/providers/tests/system/amazon/aws/example_sftp_to_s3.py index 85dac988cb82e..765a68c9946f5 100644 --- a/providers/tests/system/amazon/aws/example_sftp_to_s3.py +++ b/providers/tests/system/amazon/aws/example_sftp_to_s3.py @@ -71,13 +71,13 @@ delete_s3_bucket, ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/amazon/aws/example_sns.py b/providers/tests/system/amazon/aws/example_sns.py index d00227536da0b..06756a244ae9d 100644 --- a/providers/tests/system/amazon/aws/example_sns.py +++ b/providers/tests/system/amazon/aws/example_sns.py @@ -75,14 +75,14 @@ def delete_topic(topic_arn) -> None: delete_topic(create_sns_topic), ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/amazon/aws/example_sql_to_s3.py b/providers/tests/system/amazon/aws/example_sql_to_s3.py index dd333073a0431..4cb8a2e7b9be2 100644 --- a/providers/tests/system/amazon/aws/example_sql_to_s3.py +++ b/providers/tests/system/amazon/aws/example_sql_to_s3.py @@ -199,14 +199,14 @@ def create_connection(conn_id_name: str, cluster_id: str): delete_cluster, ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/amazon/aws/example_sqs.py b/providers/tests/system/amazon/aws/example_sqs.py index 2aba6a580c4d7..f14cf3b7a713c 100644 --- a/providers/tests/system/amazon/aws/example_sqs.py +++ b/providers/tests/system/amazon/aws/example_sqs.py @@ -100,14 +100,14 @@ def delete_queue(queue_url): delete_queue(sqs_queue), ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/amazon/aws/example_step_functions.py b/providers/tests/system/amazon/aws/example_step_functions.py index beeb12528c7ac..eb3a399c69a93 100644 --- a/providers/tests/system/amazon/aws/example_step_functions.py +++ b/providers/tests/system/amazon/aws/example_step_functions.py @@ -112,13 +112,13 @@ def delete_state_machine(state_machine_arn): delete_state_machine(state_machine_arn), ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/amazon/aws/tests/test_aws_auth_manager.py b/providers/tests/system/amazon/aws/tests/test_aws_auth_manager.py index 774aec21b2b6b..2656474cbbf51 100644 --- a/providers/tests/system/amazon/aws/tests/test_aws_auth_manager.py +++ b/providers/tests/system/amazon/aws/tests/test_aws_auth_manager.py @@ -21,11 +21,11 @@ import boto3 import pytest +from tests_common.test_utils.config import conf_vars +from tests_common.test_utils.www import check_content_in_response from airflow.www import app as application -from dev.tests_common.test_utils.config import conf_vars -from dev.tests_common.test_utils.www import check_content_in_response from providers.tests.system.amazon.aws.utils import set_env_id SAML_METADATA_URL = "/saml/metadata" diff --git a/providers/tests/system/apache/beam/example_beam.py b/providers/tests/system/apache/beam/example_beam.py index 4166caa3477a4..b90971149bac8 100644 --- a/providers/tests/system/apache/beam/example_beam.py +++ b/providers/tests/system/apache/beam/example_beam.py @@ -61,7 +61,7 @@ # [END howto_operator_start_java_direct_runner_pipeline] -from dev.tests_common.test_utils.system_tests import get_test_run +from tests_common.test_utils.system_tests import get_test_run # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/apache/beam/example_beam_java_flink.py b/providers/tests/system/apache/beam/example_beam_java_flink.py index a68637d8ef8d9..8f639b0829f8d 100644 --- a/providers/tests/system/apache/beam/example_beam_java_flink.py +++ b/providers/tests/system/apache/beam/example_beam_java_flink.py @@ -60,7 +60,7 @@ jar_to_local_flink_runner >> start_java_pipeline_flink_runner -from dev.tests_common.test_utils.system_tests import get_test_run +from tests_common.test_utils.system_tests import get_test_run # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/apache/beam/example_beam_java_spark.py b/providers/tests/system/apache/beam/example_beam_java_spark.py index eb3fea6d16dab..b45ce5bbba642 100644 --- a/providers/tests/system/apache/beam/example_beam_java_spark.py +++ b/providers/tests/system/apache/beam/example_beam_java_spark.py @@ -60,7 +60,7 @@ jar_to_local_spark_runner >> start_java_pipeline_spark_runner -from dev.tests_common.test_utils.system_tests import get_test_run +from tests_common.test_utils.system_tests import get_test_run # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/apache/beam/example_go.py b/providers/tests/system/apache/beam/example_go.py index 792eee088bf6d..ecdd8a20ed370 100644 --- a/providers/tests/system/apache/beam/example_go.py +++ b/providers/tests/system/apache/beam/example_go.py @@ -103,7 +103,7 @@ ) -from dev.tests_common.test_utils.system_tests import get_test_run +from tests_common.test_utils.system_tests import get_test_run # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/apache/beam/example_go_dataflow.py b/providers/tests/system/apache/beam/example_go_dataflow.py index 35a63cb56e1e7..e1904ea13050b 100644 --- a/providers/tests/system/apache/beam/example_go_dataflow.py +++ b/providers/tests/system/apache/beam/example_go_dataflow.py @@ -76,7 +76,7 @@ # [END howto_operator_start_go_dataflow_runner_pipeline_async_gcs_file] -from dev.tests_common.test_utils.system_tests import get_test_run +from tests_common.test_utils.system_tests import get_test_run # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/apache/beam/example_java_dataflow.py b/providers/tests/system/apache/beam/example_java_dataflow.py index 334142dfd315c..d01d52fe658eb 100644 --- a/providers/tests/system/apache/beam/example_java_dataflow.py +++ b/providers/tests/system/apache/beam/example_java_dataflow.py @@ -66,7 +66,7 @@ # [END howto_operator_start_java_dataflow_runner_pipeline] -from dev.tests_common.test_utils.system_tests import get_test_run +from tests_common.test_utils.system_tests import get_test_run # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/apache/beam/example_python.py b/providers/tests/system/apache/beam/example_python.py index d685cb33d2dad..4b4b9c2c05b36 100644 --- a/providers/tests/system/apache/beam/example_python.py +++ b/providers/tests/system/apache/beam/example_python.py @@ -120,7 +120,7 @@ ) -from dev.tests_common.test_utils.system_tests import get_test_run +from tests_common.test_utils.system_tests import get_test_run # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/apache/beam/example_python_async.py b/providers/tests/system/apache/beam/example_python_async.py index 8465278b6bf76..0419a13cced23 100644 --- a/providers/tests/system/apache/beam/example_python_async.py +++ b/providers/tests/system/apache/beam/example_python_async.py @@ -129,7 +129,7 @@ ) -from dev.tests_common.test_utils.system_tests import get_test_run +from tests_common.test_utils.system_tests import get_test_run # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/apache/beam/example_python_dataflow.py b/providers/tests/system/apache/beam/example_python_dataflow.py index 36d6b3b8562e3..8d1295ed29a0e 100644 --- a/providers/tests/system/apache/beam/example_python_dataflow.py +++ b/providers/tests/system/apache/beam/example_python_dataflow.py @@ -79,7 +79,7 @@ # [END howto_operator_start_python_dataflow_runner_pipeline_async_gcs_file] -from dev.tests_common.test_utils.system_tests import get_test_run +from tests_common.test_utils.system_tests import get_test_run # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/apache/cassandra/example_cassandra_dag.py b/providers/tests/system/apache/cassandra/example_cassandra_dag.py index 0b25fa2975dbd..5c1fe9b5271c5 100644 --- a/providers/tests/system/apache/cassandra/example_cassandra_dag.py +++ b/providers/tests/system/apache/cassandra/example_cassandra_dag.py @@ -50,7 +50,7 @@ record_sensor = CassandraRecordSensor(task_id="cassandra_record_sensor", keys={"p1": "v1", "p2": "v2"}) # [END howto_operator_cassandra_sensors] -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/apache/drill/example_drill_dag.py b/providers/tests/system/apache/drill/example_drill_dag.py index fdaf376d5a162..7386f3b59cb1a 100644 --- a/providers/tests/system/apache/drill/example_drill_dag.py +++ b/providers/tests/system/apache/drill/example_drill_dag.py @@ -47,7 +47,7 @@ ) # [END howto_operator_drill] -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/apache/druid/example_druid_dag.py b/providers/tests/system/apache/druid/example_druid_dag.py index 5e1bfc446bb09..eac9af6d19c57 100644 --- a/providers/tests/system/apache/druid/example_druid_dag.py +++ b/providers/tests/system/apache/druid/example_druid_dag.py @@ -55,7 +55,7 @@ """ # [END howto_operator_druid_submit] -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/apache/hive/example_twitter_dag.py b/providers/tests/system/apache/hive/example_twitter_dag.py index 129a8ebf9f77f..c247bf9033020 100644 --- a/providers/tests/system/apache/hive/example_twitter_dag.py +++ b/providers/tests/system/apache/hive/example_twitter_dag.py @@ -154,13 +154,13 @@ def transfer_to_db(): analyze >> load_to_hdfs >> load_to_hive >> hive_to_mysql - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/apache/iceberg/example_iceberg.py b/providers/tests/system/apache/iceberg/example_iceberg.py index a4708805b6788..3c9f59f1ea14d 100644 --- a/providers/tests/system/apache/iceberg/example_iceberg.py +++ b/providers/tests/system/apache/iceberg/example_iceberg.py @@ -49,7 +49,7 @@ ) -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/apache/kafka/example_dag_event_listener.py b/providers/tests/system/apache/kafka/example_dag_event_listener.py index eb6866735e830..734cb9c49554c 100644 --- a/providers/tests/system/apache/kafka/example_dag_event_listener.py +++ b/providers/tests/system/apache/kafka/example_dag_event_listener.py @@ -120,7 +120,7 @@ def wait_for_event(message, **context): t0 >> t1 -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/apache/kafka/example_dag_hello_kafka.py b/providers/tests/system/apache/kafka/example_dag_hello_kafka.py index 5e70d7324a1a0..88fef458ea261 100644 --- a/providers/tests/system/apache/kafka/example_dag_hello_kafka.py +++ b/providers/tests/system/apache/kafka/example_dag_hello_kafka.py @@ -240,7 +240,7 @@ def hello_kafka(): t0 >> t3 >> [t4, t4b] >> t5 >> t6 -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/apache/kylin/example_kylin_dag.py b/providers/tests/system/apache/kylin/example_kylin_dag.py index 1bfec2cd1a7dd..e4de4105e05b4 100644 --- a/providers/tests/system/apache/kylin/example_kylin_dag.py +++ b/providers/tests/system/apache/kylin/example_kylin_dag.py @@ -109,13 +109,13 @@ def gen_build_time(): # gen_build_time >> refresh_task1 # gen_build_time >> merge_task # gen_build_time >> build_task3 - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/apache/livy/example_livy.py b/providers/tests/system/apache/livy/example_livy.py index 09f8f7e244e02..8f3ea04a00867 100644 --- a/providers/tests/system/apache/livy/example_livy.py +++ b/providers/tests/system/apache/livy/example_livy.py @@ -73,13 +73,13 @@ livy_java_task_deferrable >> livy_python_task_deferrable # [END create_livy_deferrable] - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/apache/pig/example_pig.py b/providers/tests/system/apache/pig/example_pig.py index bb556a85111d1..4d47bf5e6570c 100644 --- a/providers/tests/system/apache/pig/example_pig.py +++ b/providers/tests/system/apache/pig/example_pig.py @@ -44,7 +44,7 @@ # [END create_pig] -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/apache/pinot/example_pinot_dag.py b/providers/tests/system/apache/pinot/example_pinot_dag.py index d95022f366910..825c5070e2944 100644 --- a/providers/tests/system/apache/pinot/example_pinot_dag.py +++ b/providers/tests/system/apache/pinot/example_pinot_dag.py @@ -52,7 +52,7 @@ def pinot_dbi_api(): pinot_admin() pinot_dbi_api() -from dev.tests_common.test_utils.system_tests import get_test_run +from tests_common.test_utils.system_tests import get_test_run # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/apache/spark/example_pyspark.py b/providers/tests/system/apache/spark/example_pyspark.py index 0ca14a76f48f9..d2d8ef6983f04 100644 --- a/providers/tests/system/apache/spark/example_pyspark.py +++ b/providers/tests/system/apache/spark/example_pyspark.py @@ -70,7 +70,7 @@ def print_df(df: pd.DataFrame): dag = example_pyspark() # type: ignore -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/apache/spark/example_spark_dag.py b/providers/tests/system/apache/spark/example_spark_dag.py index b68fc2cf761a9..6680450ae987a 100644 --- a/providers/tests/system/apache/spark/example_spark_dag.py +++ b/providers/tests/system/apache/spark/example_spark_dag.py @@ -75,7 +75,7 @@ ) # [END howto_operator_spark_sql] -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/asana/example_asana.py b/providers/tests/system/asana/example_asana.py index ca68b6cc3dd2e..a7f4943beda41 100644 --- a/providers/tests/system/asana/example_asana.py +++ b/providers/tests/system/asana/example_asana.py @@ -100,13 +100,13 @@ create >> find >> update >> delete # [END asana_example_dag] - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/cncf/kubernetes/example_kubernetes.py b/providers/tests/system/cncf/kubernetes/example_kubernetes.py index bed3b9da746b9..dc74895a3e0fd 100644 --- a/providers/tests/system/cncf/kubernetes/example_kubernetes.py +++ b/providers/tests/system/cncf/kubernetes/example_kubernetes.py @@ -167,13 +167,13 @@ write_xcom >> pod_task_xcom_result # [END howto_operator_k8s_write_xcom] - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/cncf/kubernetes/example_kubernetes_async.py b/providers/tests/system/cncf/kubernetes/example_kubernetes_async.py index 43eb0a1f919cf..7eb08442be3ba 100644 --- a/providers/tests/system/cncf/kubernetes/example_kubernetes_async.py +++ b/providers/tests/system/cncf/kubernetes/example_kubernetes_async.py @@ -198,13 +198,13 @@ write_xcom_async >> pod_task_xcom_result_async # [END howto_operator_k8s_write_xcom_async] - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/cncf/kubernetes/example_kubernetes_decorator.py b/providers/tests/system/cncf/kubernetes/example_kubernetes_decorator.py index 088a3fdae2ede..6784b22f3a141 100644 --- a/providers/tests/system/cncf/kubernetes/example_kubernetes_decorator.py +++ b/providers/tests/system/cncf/kubernetes/example_kubernetes_decorator.py @@ -63,7 +63,7 @@ def print_pattern(): # [END howto_operator_kubernetes] -from dev.tests_common.test_utils.system_tests import get_test_run +from tests_common.test_utils.system_tests import get_test_run # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/cncf/kubernetes/example_kubernetes_job.py b/providers/tests/system/cncf/kubernetes/example_kubernetes_job.py index 1a2432c135898..c81ff48e792d4 100644 --- a/providers/tests/system/cncf/kubernetes/example_kubernetes_job.py +++ b/providers/tests/system/cncf/kubernetes/example_kubernetes_job.py @@ -94,13 +94,13 @@ k8s_job >> update_job >> delete_job_task k8s_job_def >> delete_job_task_def - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/cncf/kubernetes/example_kubernetes_resource.py b/providers/tests/system/cncf/kubernetes/example_kubernetes_resource.py index 1c24a533a85f0..e7f6a4d42d32e 100644 --- a/providers/tests/system/cncf/kubernetes/example_kubernetes_resource.py +++ b/providers/tests/system/cncf/kubernetes/example_kubernetes_resource.py @@ -72,13 +72,13 @@ t1 >> t2 - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/cncf/kubernetes/example_spark_kubernetes.py b/providers/tests/system/cncf/kubernetes/example_spark_kubernetes.py index 072cffeb90f04..b244a9a800bab 100644 --- a/providers/tests/system/cncf/kubernetes/example_spark_kubernetes.py +++ b/providers/tests/system/cncf/kubernetes/example_spark_kubernetes.py @@ -76,13 +76,13 @@ t1 >> t2 # [END SparkKubernetesOperator_DAG] - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/cohere/example_cohere_embedding_operator.py b/providers/tests/system/cohere/example_cohere_embedding_operator.py index 9686724f2cea9..d8907260d3fd7 100644 --- a/providers/tests/system/cohere/example_cohere_embedding_operator.py +++ b/providers/tests/system/cohere/example_cohere_embedding_operator.py @@ -34,7 +34,7 @@ # [END howto_operator_cohere_embedding] -from dev.tests_common.test_utils.system_tests import get_test_run +from tests_common.test_utils.system_tests import get_test_run # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/common/io/example_file_transfer_local_to_s3.py b/providers/tests/system/common/io/example_file_transfer_local_to_s3.py index 0b90a75f2e6e2..f1522d5f2611b 100644 --- a/providers/tests/system/common/io/example_file_transfer_local_to_s3.py +++ b/providers/tests/system/common/io/example_file_transfer_local_to_s3.py @@ -76,12 +76,12 @@ def remove_bucket(): temp_file >> transfer >> remove_bucket() >> delete_temp_file(temp_file_path) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/common/sql/example_sql_column_table_check.py b/providers/tests/system/common/sql/example_sql_column_table_check.py index c48dc60bfc639..4033c12faf43b 100644 --- a/providers/tests/system/common/sql/example_sql_column_table_check.py +++ b/providers/tests/system/common/sql/example_sql_column_table_check.py @@ -79,7 +79,7 @@ column_check >> row_count_check -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/common/sql/example_sql_execute_query.py b/providers/tests/system/common/sql/example_sql_execute_query.py index 8dced19cef719..535798046305b 100644 --- a/providers/tests/system/common/sql/example_sql_execute_query.py +++ b/providers/tests/system/common/sql/example_sql_execute_query.py @@ -56,7 +56,7 @@ # [END howto_operator_sql_execute_query] -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/databricks/example_databricks.py b/providers/tests/system/databricks/example_databricks.py index 00d9969bd99b3..999cebb674292 100644 --- a/providers/tests/system/databricks/example_databricks.py +++ b/providers/tests/system/databricks/example_databricks.py @@ -238,13 +238,13 @@ ) # [END howto_operator_databricks_task_sql] - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/databricks/example_databricks_repos.py b/providers/tests/system/databricks/example_databricks_repos.py index d07226e76ed01..33b0d1266f477 100644 --- a/providers/tests/system/databricks/example_databricks_repos.py +++ b/providers/tests/system/databricks/example_databricks_repos.py @@ -78,13 +78,13 @@ (create_repo >> update_repo >> notebook_task >> delete_repo) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/databricks/example_databricks_sensors.py b/providers/tests/system/databricks/example_databricks_sensors.py index ea233a79395bc..cf676183e6c9b 100644 --- a/providers/tests/system/databricks/example_databricks_sensors.py +++ b/providers/tests/system/databricks/example_databricks_sensors.py @@ -88,7 +88,7 @@ # runs, else all the subsequent DAG tasks and the DAG are marked as failed. (sql_sensor >> partition_sensor) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This example does not need a watcher in order to properly mark success/failure # since it is a single task, but it is given here as an example for users to @@ -96,7 +96,7 @@ # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/databricks/example_databricks_sql.py b/providers/tests/system/databricks/example_databricks_sql.py index f08ce3cd56b65..79c2bfa2fca9a 100644 --- a/providers/tests/system/databricks/example_databricks_sql.py +++ b/providers/tests/system/databricks/example_databricks_sql.py @@ -113,13 +113,13 @@ (create >> create_file >> import_csv >> select >> select_into_file) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/databricks/example_databricks_workflow.py b/providers/tests/system/databricks/example_databricks_workflow.py index 3a6c829520d89..5921f109d0843 100644 --- a/providers/tests/system/databricks/example_databricks_workflow.py +++ b/providers/tests/system/databricks/example_databricks_workflow.py @@ -143,13 +143,13 @@ notebook_1 >> notebook_2 >> task_operator_nb_1 >> sql_query # [END howto_databricks_workflow_notebook] - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/dbt/cloud/example_dbt_cloud.py b/providers/tests/system/dbt/cloud/example_dbt_cloud.py index 17f8a59efea02..7a9a58a87a67b 100644 --- a/providers/tests/system/dbt/cloud/example_dbt_cloud.py +++ b/providers/tests/system/dbt/cloud/example_dbt_cloud.py @@ -18,6 +18,8 @@ from datetime import datetime +from tests_common.test_utils.system_tests import get_test_env_id + from airflow.models import DAG from airflow.operators.empty import EmptyOperator from airflow.providers.dbt.cloud.operators.dbt import ( @@ -28,8 +30,6 @@ from airflow.providers.dbt.cloud.sensors.dbt import DbtCloudJobRunSensor from airflow.utils.edgemodifier import Label -from dev.tests_common.test_utils.system_tests import get_test_env_id - ENV_ID = get_test_env_id() DAG_ID = "example_dbt_cloud" @@ -92,13 +92,13 @@ # trigger_job_run2 >> job_run_sensor # trigger_job_run2 >> job_run_sensor_deferred - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/dingding/example_dingding.py b/providers/tests/system/dingding/example_dingding.py index 4ecb41c68cc91..536f28fcc0d41 100644 --- a/providers/tests/system/dingding/example_dingding.py +++ b/providers/tests/system/dingding/example_dingding.py @@ -199,13 +199,13 @@ def failure_callback(context): >> msg_failure_callback ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/docker/example_docker.py b/providers/tests/system/docker/example_docker.py index 108813236ac62..14fa3fa3203c7 100644 --- a/providers/tests/system/docker/example_docker.py +++ b/providers/tests/system/docker/example_docker.py @@ -57,7 +57,7 @@ t1 >> [t2, t3] >> t4 ) -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/docker/example_docker_copy_data.py b/providers/tests/system/docker/example_docker_copy_data.py index c270408390cfa..584b16b8e096b 100644 --- a/providers/tests/system/docker/example_docker_copy_data.py +++ b/providers/tests/system/docker/example_docker_copy_data.py @@ -103,7 +103,7 @@ t_is_data_available >> t_move >> t_print ) -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/docker/example_docker_swarm.py b/providers/tests/system/docker/example_docker_swarm.py index 3a68dcea81673..a45d1bba351ca 100644 --- a/providers/tests/system/docker/example_docker_swarm.py +++ b/providers/tests/system/docker/example_docker_swarm.py @@ -47,7 +47,7 @@ t1 ) -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/docker/example_taskflow_api_docker_virtualenv.py b/providers/tests/system/docker/example_taskflow_api_docker_virtualenv.py index 3c8b528606e02..b026d9e950fc7 100644 --- a/providers/tests/system/docker/example_taskflow_api_docker_virtualenv.py +++ b/providers/tests/system/docker/example_taskflow_api_docker_virtualenv.py @@ -116,9 +116,15 @@ def load(total_order_value: float): tutorial_dag = tutorial_taskflow_api_docker_virtualenv() # [END dag_invocation] -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) # [END tutorial] + + +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 + +# Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) +test_run = get_test_run(dag) diff --git a/providers/tests/system/elasticsearch/example_elasticsearch_query.py b/providers/tests/system/elasticsearch/example_elasticsearch_query.py index 93471d874c3c9..f4450b8e335cf 100644 --- a/providers/tests/system/elasticsearch/example_elasticsearch_query.py +++ b/providers/tests/system/elasticsearch/example_elasticsearch_query.py @@ -81,7 +81,7 @@ def use_elasticsearch_hook(): task_id="print_data_from_elasticsearch", python_callable=use_elasticsearch_hook ) -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/ftp/example_ftp.py b/providers/tests/system/ftp/example_ftp.py index 8fb2e38806ae4..5b9bfe65db4fa 100644 --- a/providers/tests/system/ftp/example_ftp.py +++ b/providers/tests/system/ftp/example_ftp.py @@ -87,13 +87,13 @@ ftp_put >> ftp_get ftps_put >> ftps_get - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/github/example_github.py b/providers/tests/system/github/example_github.py index 70eb8bf902f04..b076647177cc9 100644 --- a/providers/tests/system/github/example_github.py +++ b/providers/tests/system/github/example_github.py @@ -100,7 +100,7 @@ def tag_checker(repo: Any, tag_name: str) -> bool | None: # [END howto_operator_list_tags_github] -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/ads/example_ads.py b/providers/tests/system/google/ads/example_ads.py index 162fd45334f67..f55c7306f33aa 100644 --- a/providers/tests/system/google/ads/example_ads.py +++ b/providers/tests/system/google/ads/example_ads.py @@ -117,14 +117,14 @@ >> delete_bucket ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/automl/example_automl_dataset.py b/providers/tests/system/google/cloud/automl/example_automl_dataset.py index 49de111ffb358..d1305da4fb081 100644 --- a/providers/tests/system/google/cloud/automl/example_automl_dataset.py +++ b/providers/tests/system/google/cloud/automl/example_automl_dataset.py @@ -162,14 +162,14 @@ def upload_updated_csv_file_to_gcs(): >> delete_bucket ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/automl/example_automl_translation.py b/providers/tests/system/google/cloud/automl/example_automl_translation.py index 60dbf782f281e..e758bdf113e48 100644 --- a/providers/tests/system/google/cloud/automl/example_automl_translation.py +++ b/providers/tests/system/google/cloud/automl/example_automl_translation.py @@ -188,14 +188,14 @@ def upload_csv_file_to_gcs(): >> delete_bucket ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/automl/example_automl_video_classification.py b/providers/tests/system/google/cloud/automl/example_automl_video_classification.py index 36853c3826037..538831d307ca5 100644 --- a/providers/tests/system/google/cloud/automl/example_automl_video_classification.py +++ b/providers/tests/system/google/cloud/automl/example_automl_video_classification.py @@ -158,13 +158,13 @@ >> delete_bucket ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/automl/example_automl_video_tracking.py b/providers/tests/system/google/cloud/automl/example_automl_video_tracking.py index 65718f10b7697..3876e9b0a39de 100644 --- a/providers/tests/system/google/cloud/automl/example_automl_video_tracking.py +++ b/providers/tests/system/google/cloud/automl/example_automl_video_tracking.py @@ -158,13 +158,13 @@ >> delete_bucket ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/automl/example_automl_vision_classification.py b/providers/tests/system/google/cloud/automl/example_automl_vision_classification.py index 40e68d3291ce8..e329febf5d9fc 100644 --- a/providers/tests/system/google/cloud/automl/example_automl_vision_classification.py +++ b/providers/tests/system/google/cloud/automl/example_automl_vision_classification.py @@ -132,13 +132,13 @@ >> delete_image_dataset ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/automl/example_automl_vision_object_detection.py b/providers/tests/system/google/cloud/automl/example_automl_vision_object_detection.py index 334e154cea4d1..b87b42008d943 100644 --- a/providers/tests/system/google/cloud/automl/example_automl_vision_object_detection.py +++ b/providers/tests/system/google/cloud/automl/example_automl_vision_object_detection.py @@ -134,13 +134,13 @@ >> delete_image_dataset ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/azure/example_azure_blob_to_gcs.py b/providers/tests/system/google/cloud/azure/example_azure_blob_to_gcs.py index 837cb99e5ffc1..e915642b70204 100644 --- a/providers/tests/system/google/cloud/azure/example_azure_blob_to_gcs.py +++ b/providers/tests/system/google/cloud/azure/example_azure_blob_to_gcs.py @@ -59,13 +59,13 @@ (wait_for_blob >> transfer_files_to_gcs) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/azure/example_azure_fileshare_to_gcs.py b/providers/tests/system/google/cloud/azure/example_azure_fileshare_to_gcs.py index a897b6dc7d3d1..45172fa2070db 100644 --- a/providers/tests/system/google/cloud/azure/example_azure_fileshare_to_gcs.py +++ b/providers/tests/system/google/cloud/azure/example_azure_fileshare_to_gcs.py @@ -81,14 +81,14 @@ >> delete_bucket ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/bigquery/example_bigquery_dataset.py b/providers/tests/system/google/cloud/bigquery/example_bigquery_dataset.py index 87e13a2c25165..7be37b8631f3b 100644 --- a/providers/tests/system/google/cloud/bigquery/example_bigquery_dataset.py +++ b/providers/tests/system/google/cloud/bigquery/example_bigquery_dataset.py @@ -85,14 +85,14 @@ >> delete_dataset ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/bigquery/example_bigquery_dts.py b/providers/tests/system/google/cloud/bigquery/example_bigquery_dts.py index b387563069a94..37677a1514ac0 100644 --- a/providers/tests/system/google/cloud/bigquery/example_bigquery_dts.py +++ b/providers/tests/system/google/cloud/bigquery/example_bigquery_dts.py @@ -180,14 +180,14 @@ delete_bucket, ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/bigquery/example_bigquery_operations.py b/providers/tests/system/google/cloud/bigquery/example_bigquery_operations.py index 5e487f5a93e2a..308c4337684da 100644 --- a/providers/tests/system/google/cloud/bigquery/example_bigquery_operations.py +++ b/providers/tests/system/google/cloud/bigquery/example_bigquery_operations.py @@ -97,14 +97,14 @@ >> delete_bucket ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/bigquery/example_bigquery_operations_location.py b/providers/tests/system/google/cloud/bigquery/example_bigquery_operations_location.py index 2b026070a06b4..d7547e2b810de 100644 --- a/providers/tests/system/google/cloud/bigquery/example_bigquery_operations_location.py +++ b/providers/tests/system/google/cloud/bigquery/example_bigquery_operations_location.py @@ -77,14 +77,14 @@ >> delete_dataset_with_location ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/bigquery/example_bigquery_queries.py b/providers/tests/system/google/cloud/bigquery/example_bigquery_queries.py index cd31ea05bcdcb..0e4d930442924 100644 --- a/providers/tests/system/google/cloud/bigquery/example_bigquery_queries.py +++ b/providers/tests/system/google/cloud/bigquery/example_bigquery_queries.py @@ -247,7 +247,7 @@ execute_insert_query >> [check_count, check_value, check_interval] >> delete_dataset execute_insert_query >> [column_check, table_check] >> delete_dataset - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG @@ -257,7 +257,7 @@ globals()[DAG_ID] = dag for dag in DAGS_LIST: - from dev.tests_common.test_utils.system_tests import get_test_run + from tests_common.test_utils.system_tests import get_test_run # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/bigquery/example_bigquery_queries_async.py b/providers/tests/system/google/cloud/bigquery/example_bigquery_queries_async.py index 012eba080d1a4..104f09ea3335b 100644 --- a/providers/tests/system/google/cloud/bigquery/example_bigquery_queries_async.py +++ b/providers/tests/system/google/cloud/bigquery/example_bigquery_queries_async.py @@ -259,14 +259,14 @@ insert_query_job >> execute_long_running_query >> check_value >> check_interval [check_count, check_interval, bigquery_execute_multi_query, get_data_result] >> delete_dataset - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/bigquery/example_bigquery_sensors.py b/providers/tests/system/google/cloud/bigquery/example_bigquery_sensors.py index aa8d36f5ed893..760275f904c95 100644 --- a/providers/tests/system/google/cloud/bigquery/example_bigquery_sensors.py +++ b/providers/tests/system/google/cloud/bigquery/example_bigquery_sensors.py @@ -165,14 +165,14 @@ >> delete_dataset ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/bigquery/example_bigquery_tables.py b/providers/tests/system/google/cloud/bigquery/example_bigquery_tables.py index 9c1432a0a8da5..588e33d368d19 100644 --- a/providers/tests/system/google/cloud/bigquery/example_bigquery_tables.py +++ b/providers/tests/system/google/cloud/bigquery/example_bigquery_tables.py @@ -224,14 +224,14 @@ >> delete_dataset ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/bigquery/example_bigquery_to_bigquery.py b/providers/tests/system/google/cloud/bigquery/example_bigquery_to_bigquery.py index cb1fa63498da9..879d8aa3fb284 100644 --- a/providers/tests/system/google/cloud/bigquery/example_bigquery_to_bigquery.py +++ b/providers/tests/system/google/cloud/bigquery/example_bigquery_to_bigquery.py @@ -100,14 +100,14 @@ >> delete_dataset ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/bigquery/example_bigquery_to_gcs.py b/providers/tests/system/google/cloud/bigquery/example_bigquery_to_gcs.py index 21acb27f161db..76684a1c05c38 100644 --- a/providers/tests/system/google/cloud/bigquery/example_bigquery_to_gcs.py +++ b/providers/tests/system/google/cloud/bigquery/example_bigquery_to_gcs.py @@ -98,14 +98,14 @@ >> [delete_bucket, delete_dataset] ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/bigquery/example_bigquery_to_gcs_async.py b/providers/tests/system/google/cloud/bigquery/example_bigquery_to_gcs_async.py index fdf084601c770..2bc4846fea343 100644 --- a/providers/tests/system/google/cloud/bigquery/example_bigquery_to_gcs_async.py +++ b/providers/tests/system/google/cloud/bigquery/example_bigquery_to_gcs_async.py @@ -97,14 +97,14 @@ >> [delete_bucket, delete_dataset] ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/bigquery/example_bigquery_to_mssql.py b/providers/tests/system/google/cloud/bigquery/example_bigquery_to_mssql.py index 51e713560bc23..3fd5e9259548e 100644 --- a/providers/tests/system/google/cloud/bigquery/example_bigquery_to_mssql.py +++ b/providers/tests/system/google/cloud/bigquery/example_bigquery_to_mssql.py @@ -326,13 +326,13 @@ def delete_connection(connection_id: str) -> None: >> delete_persistent_disk ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/bigquery/example_bigquery_to_mysql.py b/providers/tests/system/google/cloud/bigquery/example_bigquery_to_mysql.py index a3b726098773d..623924c2c96b2 100644 --- a/providers/tests/system/google/cloud/bigquery/example_bigquery_to_mysql.py +++ b/providers/tests/system/google/cloud/bigquery/example_bigquery_to_mysql.py @@ -88,13 +88,13 @@ >> delete_dataset ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/bigquery/example_bigquery_to_postgres.py b/providers/tests/system/google/cloud/bigquery/example_bigquery_to_postgres.py index ca4e3148d0a18..54f5efc13d93e 100644 --- a/providers/tests/system/google/cloud/bigquery/example_bigquery_to_postgres.py +++ b/providers/tests/system/google/cloud/bigquery/example_bigquery_to_postgres.py @@ -362,13 +362,13 @@ def delete_connection(connection_id: str) -> None: >> delete_persistent_disk ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/bigquery/example_bigquery_transfer.py b/providers/tests/system/google/cloud/bigquery/example_bigquery_transfer.py index 73d55710c9db9..39f1eea2bd1d5 100644 --- a/providers/tests/system/google/cloud/bigquery/example_bigquery_transfer.py +++ b/providers/tests/system/google/cloud/bigquery/example_bigquery_transfer.py @@ -117,13 +117,13 @@ >> delete_bucket ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/bigquery/example_bigquery_value_check.py b/providers/tests/system/google/cloud/bigquery/example_bigquery_value_check.py index 3872ca092321f..5a51ad310135f 100644 --- a/providers/tests/system/google/cloud/bigquery/example_bigquery_value_check.py +++ b/providers/tests/system/google/cloud/bigquery/example_bigquery_value_check.py @@ -131,8 +131,8 @@ >> delete_dataset ) - from dev.tests_common.test_utils.system_tests import get_test_run - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.system_tests import get_test_run + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG @@ -142,7 +142,7 @@ test_run = get_test_run(dag) -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/bigtable/example_bigtable.py b/providers/tests/system/google/cloud/bigtable/example_bigtable.py index 77abc49fae258..b1f3469f4fcb9 100644 --- a/providers/tests/system/google/cloud/bigtable/example_bigtable.py +++ b/providers/tests/system/google/cloud/bigtable/example_bigtable.py @@ -225,14 +225,14 @@ def update_clusters_and_instance(): >> [delete_instance_task, delete_instance_task2] ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/cloud_batch/example_cloud_batch.py b/providers/tests/system/google/cloud/cloud_batch/example_cloud_batch.py index 84dc031a5268f..322c6cd7eceae 100644 --- a/providers/tests/system/google/cloud/cloud_batch/example_cloud_batch.py +++ b/providers/tests/system/google/cloud/cloud_batch/example_cloud_batch.py @@ -187,13 +187,13 @@ def _create_job(): ([submit1, submit2] >> list_tasks >> assert_tasks >> list_jobs >> get_name >> [delete_job1, delete_job2]) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/cloud_build/example_cloud_build.py b/providers/tests/system/google/cloud/cloud_build/example_cloud_build.py index bf2391413a1c3..319047fbaa63a 100644 --- a/providers/tests/system/google/cloud/cloud_build/example_cloud_build.py +++ b/providers/tests/system/google/cloud/cloud_build/example_cloud_build.py @@ -267,14 +267,14 @@ def no_wait_cancel_retry_get_deferrable(): ] ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/cloud_build/example_cloud_build_trigger.py b/providers/tests/system/google/cloud/cloud_build/example_cloud_build_trigger.py index f6873da9c5680..e799af6650d1e 100644 --- a/providers/tests/system/google/cloud/cloud_build/example_cloud_build_trigger.py +++ b/providers/tests/system/google/cloud/cloud_build/example_cloud_build_trigger.py @@ -182,14 +182,14 @@ def get_project_number(): >> list_build_triggers ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/cloud_functions/example_functions.py b/providers/tests/system/google/cloud/cloud_functions/example_functions.py index fd0b8ea5f5a4c..675224980469f 100644 --- a/providers/tests/system/google/cloud/cloud_functions/example_functions.py +++ b/providers/tests/system/google/cloud/cloud_functions/example_functions.py @@ -122,14 +122,14 @@ delete_function, ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/cloud_memorystore/example_cloud_memorystore_memcached.py b/providers/tests/system/google/cloud/cloud_memorystore/example_cloud_memorystore_memcached.py index 670a850b04ac4..5d425b8b0e3cc 100644 --- a/providers/tests/system/google/cloud/cloud_memorystore/example_cloud_memorystore_memcached.py +++ b/providers/tests/system/google/cloud/cloud_memorystore/example_cloud_memorystore_memcached.py @@ -198,14 +198,14 @@ # ### Everything below this line is not part of example ### # ### Just for system tests purpose ### - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/cloud_memorystore/example_cloud_memorystore_redis.py b/providers/tests/system/google/cloud/cloud_memorystore/example_cloud_memorystore_redis.py index 3d8ebf6f287dc..cb5551f070405 100644 --- a/providers/tests/system/google/cloud/cloud_memorystore/example_cloud_memorystore_redis.py +++ b/providers/tests/system/google/cloud/cloud_memorystore/example_cloud_memorystore_redis.py @@ -266,14 +266,14 @@ # ### Everything below this line is not part of example ### # ### Just for system tests purpose ### - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/cloud_run/example_cloud_run.py b/providers/tests/system/google/cloud/cloud_run/example_cloud_run.py index 08145e0336ede..368d835ddb6ad 100644 --- a/providers/tests/system/google/cloud/cloud_run/example_cloud_run.py +++ b/providers/tests/system/google/cloud/cloud_run/example_cloud_run.py @@ -367,13 +367,13 @@ def _create_job_instance_with_label(): >> (delete_job1, delete_job2, delete_job3) ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/cloud_run/example_cloud_run_service.py b/providers/tests/system/google/cloud/cloud_run/example_cloud_run_service.py index 43318c4b14306..8d87bcbc10033 100644 --- a/providers/tests/system/google/cloud/cloud_run/example_cloud_run_service.py +++ b/providers/tests/system/google/cloud/cloud_run/example_cloud_run_service.py @@ -84,14 +84,14 @@ def _create_service(): >> delete_cloud_run_service ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/cloud_sql/example_cloud_sql.py b/providers/tests/system/google/cloud/cloud_sql/example_cloud_sql.py index 52414b2784b27..57da5f43c1d64 100644 --- a/providers/tests/system/google/cloud/cloud_sql/example_cloud_sql.py +++ b/providers/tests/system/google/cloud/cloud_sql/example_cloud_sql.py @@ -294,14 +294,14 @@ # ### Everything below this line is not part of example ### # ### Just for system tests purpose ### - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/cloud_sql/example_cloud_sql_query.py b/providers/tests/system/google/cloud/cloud_sql/example_cloud_sql_query.py index 6cf7e0c08751c..3d97fad5aacf9 100644 --- a/providers/tests/system/google/cloud/cloud_sql/example_cloud_sql_query.py +++ b/providers/tests/system/google/cloud/cloud_sql/example_cloud_sql_query.py @@ -541,13 +541,13 @@ def delete_connection(connection_id: str) -> None: # ### Everything below this line is not part of example ### # ### Just for system tests purpose ### - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/cloud_sql/example_cloud_sql_query_ssl.py b/providers/tests/system/google/cloud/cloud_sql/example_cloud_sql_query_ssl.py index db77f18339af0..69ec1784fa47c 100644 --- a/providers/tests/system/google/cloud/cloud_sql/example_cloud_sql_query_ssl.py +++ b/providers/tests/system/google/cloud/cloud_sql/example_cloud_sql_query_ssl.py @@ -491,13 +491,13 @@ def delete_secret(ssl_secret_id, db_type: str) -> None: # ### Everything below this line is not part of example ### # ### Just for system tests purpose ### - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/composer/example_cloud_composer.py b/providers/tests/system/google/cloud/composer/example_cloud_composer.py index 266a7e4a444ad..f04a2c8596a1e 100644 --- a/providers/tests/system/google/cloud/composer/example_cloud_composer.py +++ b/providers/tests/system/google/cloud/composer/example_cloud_composer.py @@ -214,14 +214,14 @@ [delete_env, defer_delete_env], ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "teardown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/compute/example_compute.py b/providers/tests/system/google/cloud/compute/example_compute.py index 8343920890708..82f2b008c14dc 100644 --- a/providers/tests/system/google/cloud/compute/example_compute.py +++ b/providers/tests/system/google/cloud/compute/example_compute.py @@ -267,14 +267,14 @@ # ### Everything below this line is not part of example ### # ### Just for system tests purpose ### - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/compute/example_compute_igm.py b/providers/tests/system/google/cloud/compute/example_compute_igm.py index 11357452dfc69..5f292958c2308 100644 --- a/providers/tests/system/google/cloud/compute/example_compute_igm.py +++ b/providers/tests/system/google/cloud/compute/example_compute_igm.py @@ -236,14 +236,14 @@ # ### Everything below this line is not part of example ### # ### Just for system tests purpose ### - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/compute/example_compute_ssh.py b/providers/tests/system/google/cloud/compute/example_compute_ssh.py index 5b7d1523017ff..ffba97e91db15 100644 --- a/providers/tests/system/google/cloud/compute/example_compute_ssh.py +++ b/providers/tests/system/google/cloud/compute/example_compute_ssh.py @@ -138,14 +138,14 @@ # ### Everything below this line is not part of example ### # ### Just for system tests purpose ### - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/compute/example_compute_ssh_os_login.py b/providers/tests/system/google/cloud/compute/example_compute_ssh_os_login.py index 63ed278a08c5a..89a9223e7069c 100644 --- a/providers/tests/system/google/cloud/compute/example_compute_ssh_os_login.py +++ b/providers/tests/system/google/cloud/compute/example_compute_ssh_os_login.py @@ -146,14 +146,14 @@ # ### Everything below this line is not part of example ### # ### Just for system tests purpose ### - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/compute/example_compute_ssh_parallel.py b/providers/tests/system/google/cloud/compute/example_compute_ssh_parallel.py index 3ab61afc0c259..e8b8767fffb79 100644 --- a/providers/tests/system/google/cloud/compute/example_compute_ssh_parallel.py +++ b/providers/tests/system/google/cloud/compute/example_compute_ssh_parallel.py @@ -139,14 +139,14 @@ # ### Everything below this line is not part of example ### # ### Just for system tests purpose ### - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/data_loss_prevention/example_dlp_deidentify_content.py b/providers/tests/system/google/cloud/data_loss_prevention/example_dlp_deidentify_content.py index 75b1ad93dd479..78549f3735073 100644 --- a/providers/tests/system/google/cloud/data_loss_prevention/example_dlp_deidentify_content.py +++ b/providers/tests/system/google/cloud/data_loss_prevention/example_dlp_deidentify_content.py @@ -157,14 +157,14 @@ >> delete_template ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "teardown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/data_loss_prevention/example_dlp_info_types.py b/providers/tests/system/google/cloud/data_loss_prevention/example_dlp_info_types.py index fb2198b16793f..72e35d3234491 100644 --- a/providers/tests/system/google/cloud/data_loss_prevention/example_dlp_info_types.py +++ b/providers/tests/system/google/cloud/data_loss_prevention/example_dlp_info_types.py @@ -154,14 +154,14 @@ >> delete_bucket ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "teardown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/data_loss_prevention/example_dlp_inspect_template.py b/providers/tests/system/google/cloud/data_loss_prevention/example_dlp_inspect_template.py index 22b259582f4ac..0d48b2fc19545 100644 --- a/providers/tests/system/google/cloud/data_loss_prevention/example_dlp_inspect_template.py +++ b/providers/tests/system/google/cloud/data_loss_prevention/example_dlp_inspect_template.py @@ -115,14 +115,14 @@ >> delete_template ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "teardown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/data_loss_prevention/example_dlp_job.py b/providers/tests/system/google/cloud/data_loss_prevention/example_dlp_job.py index b7dc2ac1a4053..27db1730ad0bc 100644 --- a/providers/tests/system/google/cloud/data_loss_prevention/example_dlp_job.py +++ b/providers/tests/system/google/cloud/data_loss_prevention/example_dlp_job.py @@ -90,14 +90,14 @@ (create_job >> list_jobs >> get_job >> cancel_job >> delete_job) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "teardown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/data_loss_prevention/example_dlp_job_trigger.py b/providers/tests/system/google/cloud/data_loss_prevention/example_dlp_job_trigger.py index 902875f7b5921..11fd48e1e4e05 100644 --- a/providers/tests/system/google/cloud/data_loss_prevention/example_dlp_job_trigger.py +++ b/providers/tests/system/google/cloud/data_loss_prevention/example_dlp_job_trigger.py @@ -95,14 +95,14 @@ (create_trigger >> list_triggers >> get_trigger >> update_trigger >> delete_trigger) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "teardown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/dataflow/example_dataflow_go.py b/providers/tests/system/google/cloud/dataflow/example_dataflow_go.py index 57e5941e3ed6b..92e779f69d66d 100644 --- a/providers/tests/system/google/cloud/dataflow/example_dataflow_go.py +++ b/providers/tests/system/google/cloud/dataflow/example_dataflow_go.py @@ -149,7 +149,7 @@ def check_autoscaling_event(autoscaling_events: list[dict]) -> bool: ) -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/dataflow/example_dataflow_native_java.py b/providers/tests/system/google/cloud/dataflow/example_dataflow_native_java.py index 3629194e6ee9b..66d0ce0995c73 100644 --- a/providers/tests/system/google/cloud/dataflow/example_dataflow_native_java.py +++ b/providers/tests/system/google/cloud/dataflow/example_dataflow_native_java.py @@ -148,14 +148,14 @@ >> delete_bucket ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "teardown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/dataflow/example_dataflow_native_python.py b/providers/tests/system/google/cloud/dataflow/example_dataflow_native_python.py index 229373ed1bf3f..70cd5db9e9dd4 100644 --- a/providers/tests/system/google/cloud/dataflow/example_dataflow_native_python.py +++ b/providers/tests/system/google/cloud/dataflow/example_dataflow_native_python.py @@ -110,14 +110,14 @@ >> delete_bucket ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "teardown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/dataflow/example_dataflow_native_python_async.py b/providers/tests/system/google/cloud/dataflow/example_dataflow_native_python_async.py index 31f1cd026f19a..9bca9b02871b9 100644 --- a/providers/tests/system/google/cloud/dataflow/example_dataflow_native_python_async.py +++ b/providers/tests/system/google/cloud/dataflow/example_dataflow_native_python_async.py @@ -176,14 +176,14 @@ def check_autoscaling_event(autoscaling_events: list[dict]) -> bool: >> delete_bucket ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "teardown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/dataflow/example_dataflow_pipeline.py b/providers/tests/system/google/cloud/dataflow/example_dataflow_pipeline.py index cfd5e06b029b6..800540eb4d70a 100644 --- a/providers/tests/system/google/cloud/dataflow/example_dataflow_pipeline.py +++ b/providers/tests/system/google/cloud/dataflow/example_dataflow_pipeline.py @@ -137,14 +137,14 @@ >> delete_bucket ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "teardown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/dataflow/example_dataflow_sensors_deferrable.py b/providers/tests/system/google/cloud/dataflow/example_dataflow_sensors_deferrable.py index 1a6d0aec3923b..c6303d74231be 100644 --- a/providers/tests/system/google/cloud/dataflow/example_dataflow_sensors_deferrable.py +++ b/providers/tests/system/google/cloud/dataflow/example_dataflow_sensors_deferrable.py @@ -177,14 +177,14 @@ def check_autoscaling_event(autoscaling_events: list[dict]) -> bool: >> delete_bucket ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "teardown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/dataflow/example_dataflow_sql.py b/providers/tests/system/google/cloud/dataflow/example_dataflow_sql.py index e3b0ee711a921..2ba0bf0534c59 100644 --- a/providers/tests/system/google/cloud/dataflow/example_dataflow_sql.py +++ b/providers/tests/system/google/cloud/dataflow/example_dataflow_sql.py @@ -137,13 +137,13 @@ >> delete_bq_dataset ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/dataflow/example_dataflow_streaming_python.py b/providers/tests/system/google/cloud/dataflow/example_dataflow_streaming_python.py index a15dffb3a3282..4e7a7ccebdd1b 100644 --- a/providers/tests/system/google/cloud/dataflow/example_dataflow_streaming_python.py +++ b/providers/tests/system/google/cloud/dataflow/example_dataflow_streaming_python.py @@ -114,14 +114,14 @@ >> delete_bucket ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "teardown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/dataflow/example_dataflow_template.py b/providers/tests/system/google/cloud/dataflow/example_dataflow_template.py index 86545514607aa..4b5bccacb0fa1 100644 --- a/providers/tests/system/google/cloud/dataflow/example_dataflow_template.py +++ b/providers/tests/system/google/cloud/dataflow/example_dataflow_template.py @@ -158,14 +158,14 @@ delete_bucket, ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "teardown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/dataflow/example_dataflow_yaml.py b/providers/tests/system/google/cloud/dataflow/example_dataflow_yaml.py index 2243ad695bdd4..14db8b8936223 100644 --- a/providers/tests/system/google/cloud/dataflow/example_dataflow_yaml.py +++ b/providers/tests/system/google/cloud/dataflow/example_dataflow_yaml.py @@ -162,13 +162,13 @@ >> delete_bq_dataset ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/dataform/example_dataform.py b/providers/tests/system/google/cloud/dataform/example_dataform.py index b61247a877008..e88a37caef2e6 100644 --- a/providers/tests/system/google/cloud/dataform/example_dataform.py +++ b/providers/tests/system/google/cloud/dataform/example_dataform.py @@ -328,13 +328,13 @@ # ### Everything below this line is not part of example ### # ### Just for system tests purpose ### - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/datafusion/example_datafusion.py b/providers/tests/system/google/cloud/datafusion/example_datafusion.py index a61fbbd01da91..2181d2b2badab 100644 --- a/providers/tests/system/google/cloud/datafusion/example_datafusion.py +++ b/providers/tests/system/google/cloud/datafusion/example_datafusion.py @@ -340,13 +340,13 @@ def get_artifacts_versions(ti=None): >> [delete_bucket1, delete_bucket2] ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/datapipelines/example_datapipeline.py b/providers/tests/system/google/cloud/datapipelines/example_datapipeline.py index 91fb7eed26d2a..0c0c430eae150 100644 --- a/providers/tests/system/google/cloud/datapipelines/example_datapipeline.py +++ b/providers/tests/system/google/cloud/datapipelines/example_datapipeline.py @@ -138,14 +138,14 @@ >> delete_bucket ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "teardown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/dataplex/example_dataplex.py b/providers/tests/system/google/cloud/dataplex/example_dataplex.py index 34e9a0fd05c19..f5ce1bbd41780 100644 --- a/providers/tests/system/google/cloud/dataplex/example_dataplex.py +++ b/providers/tests/system/google/cloud/dataplex/example_dataplex.py @@ -206,14 +206,14 @@ delete_bucket, ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/dataplex/example_dataplex_dp.py b/providers/tests/system/google/cloud/dataplex/example_dataplex_dp.py index 44f4af2435925..da447a8ced5e4 100644 --- a/providers/tests/system/google/cloud/dataplex/example_dataplex_dp.py +++ b/providers/tests/system/google/cloud/dataplex/example_dataplex_dp.py @@ -329,14 +329,14 @@ [delete_lake, delete_dataset], ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/dataplex/example_dataplex_dq.py b/providers/tests/system/google/cloud/dataplex/example_dataplex_dq.py index d31d574755c90..1a1910757fca3 100644 --- a/providers/tests/system/google/cloud/dataplex/example_dataplex_dq.py +++ b/providers/tests/system/google/cloud/dataplex/example_dataplex_dq.py @@ -363,14 +363,14 @@ [delete_lake, delete_dataset], ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/dataprep/example_dataprep.py b/providers/tests/system/google/cloud/dataprep/example_dataprep.py index cdc736a41c66b..edffb69e580b4 100644 --- a/providers/tests/system/google/cloud/dataprep/example_dataprep.py +++ b/providers/tests/system/google/cloud/dataprep/example_dataprep.py @@ -307,14 +307,14 @@ def delete_connection(connection_id: str) -> None: [delete_bucket_task, delete_connection_task], ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/dataproc/example_dataproc_batch.py b/providers/tests/system/google/cloud/dataproc/example_dataproc_batch.py index 54481f43ca762..c88a1c3c6803c 100644 --- a/providers/tests/system/google/cloud/dataproc/example_dataproc_batch.py +++ b/providers/tests/system/google/cloud/dataproc/example_dataproc_batch.py @@ -176,13 +176,13 @@ >> delete_batch_4 ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "teardown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/dataproc/example_dataproc_batch_deferrable.py b/providers/tests/system/google/cloud/dataproc/example_dataproc_batch_deferrable.py index 79d3766995e3d..17e5f99b52585 100644 --- a/providers/tests/system/google/cloud/dataproc/example_dataproc_batch_deferrable.py +++ b/providers/tests/system/google/cloud/dataproc/example_dataproc_batch_deferrable.py @@ -91,14 +91,14 @@ >> delete_batch ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "teardown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/dataproc/example_dataproc_batch_persistent.py b/providers/tests/system/google/cloud/dataproc/example_dataproc_batch_persistent.py index a8ed6b13de552..5bf500aeef3c0 100644 --- a/providers/tests/system/google/cloud/dataproc/example_dataproc_batch_persistent.py +++ b/providers/tests/system/google/cloud/dataproc/example_dataproc_batch_persistent.py @@ -141,14 +141,14 @@ >> delete_bucket ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "teardown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/dataproc/example_dataproc_cluster_create_existing_stopped_cluster.py b/providers/tests/system/google/cloud/dataproc/example_dataproc_cluster_create_existing_stopped_cluster.py index 0eb27762c2f98..e64a0914941c9 100644 --- a/providers/tests/system/google/cloud/dataproc/example_dataproc_cluster_create_existing_stopped_cluster.py +++ b/providers/tests/system/google/cloud/dataproc/example_dataproc_cluster_create_existing_stopped_cluster.py @@ -121,13 +121,13 @@ >> delete_cluster ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "teardown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/dataproc/example_dataproc_cluster_deferrable.py b/providers/tests/system/google/cloud/dataproc/example_dataproc_cluster_deferrable.py index 8ae262dbf624c..2f7153d44059e 100644 --- a/providers/tests/system/google/cloud/dataproc/example_dataproc_cluster_deferrable.py +++ b/providers/tests/system/google/cloud/dataproc/example_dataproc_cluster_deferrable.py @@ -137,14 +137,14 @@ >> delete_cluster ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "teardown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/dataproc/example_dataproc_cluster_diagnose.py b/providers/tests/system/google/cloud/dataproc/example_dataproc_cluster_diagnose.py index 3eacc905bc703..9e6c228a9d90d 100644 --- a/providers/tests/system/google/cloud/dataproc/example_dataproc_cluster_diagnose.py +++ b/providers/tests/system/google/cloud/dataproc/example_dataproc_cluster_diagnose.py @@ -115,14 +115,14 @@ >> delete_cluster ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "teardown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/dataproc/example_dataproc_cluster_generator.py b/providers/tests/system/google/cloud/dataproc/example_dataproc_cluster_generator.py index f990363c48004..0562be439b1c6 100644 --- a/providers/tests/system/google/cloud/dataproc/example_dataproc_cluster_generator.py +++ b/providers/tests/system/google/cloud/dataproc/example_dataproc_cluster_generator.py @@ -135,14 +135,14 @@ >> [delete_cluster, delete_bucket] ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "teardown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/dataproc/example_dataproc_cluster_start_stop.py b/providers/tests/system/google/cloud/dataproc/example_dataproc_cluster_start_stop.py index 2e4b698573bf2..c68bdd013bb2d 100644 --- a/providers/tests/system/google/cloud/dataproc/example_dataproc_cluster_start_stop.py +++ b/providers/tests/system/google/cloud/dataproc/example_dataproc_cluster_start_stop.py @@ -111,13 +111,13 @@ >> delete_cluster ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "teardown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/dataproc/example_dataproc_cluster_update.py b/providers/tests/system/google/cloud/dataproc/example_dataproc_cluster_update.py index 7ed0061d9947c..620019cd4856b 100644 --- a/providers/tests/system/google/cloud/dataproc/example_dataproc_cluster_update.py +++ b/providers/tests/system/google/cloud/dataproc/example_dataproc_cluster_update.py @@ -120,14 +120,14 @@ >> delete_cluster ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "teardown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/dataproc/example_dataproc_flink.py b/providers/tests/system/google/cloud/dataproc/example_dataproc_flink.py index ce1a6fc4451e9..34bcdb17e5479 100644 --- a/providers/tests/system/google/cloud/dataproc/example_dataproc_flink.py +++ b/providers/tests/system/google/cloud/dataproc/example_dataproc_flink.py @@ -124,14 +124,14 @@ >> [delete_cluster, delete_bucket] ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "teardown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/dataproc/example_dataproc_gke.py b/providers/tests/system/google/cloud/dataproc/example_dataproc_gke.py index bb1044da62414..8048a23283e4c 100644 --- a/providers/tests/system/google/cloud/dataproc/example_dataproc_gke.py +++ b/providers/tests/system/google/cloud/dataproc/example_dataproc_gke.py @@ -144,13 +144,13 @@ >> delete_gke_cluster ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "teardown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/dataproc/example_dataproc_hadoop.py b/providers/tests/system/google/cloud/dataproc/example_dataproc_hadoop.py index c1f5423041fa4..e4370b2f7955c 100644 --- a/providers/tests/system/google/cloud/dataproc/example_dataproc_hadoop.py +++ b/providers/tests/system/google/cloud/dataproc/example_dataproc_hadoop.py @@ -123,14 +123,14 @@ >> [delete_cluster, delete_bucket] ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "teardown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/dataproc/example_dataproc_hive.py b/providers/tests/system/google/cloud/dataproc/example_dataproc_hive.py index 6aadceb552f61..bcddd461560c5 100644 --- a/providers/tests/system/google/cloud/dataproc/example_dataproc_hive.py +++ b/providers/tests/system/google/cloud/dataproc/example_dataproc_hive.py @@ -124,14 +124,14 @@ >> delete_cluster ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "teardown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/dataproc/example_dataproc_pig.py b/providers/tests/system/google/cloud/dataproc/example_dataproc_pig.py index 762ca2bc73fd2..848138ae54732 100644 --- a/providers/tests/system/google/cloud/dataproc/example_dataproc_pig.py +++ b/providers/tests/system/google/cloud/dataproc/example_dataproc_pig.py @@ -108,14 +108,14 @@ >> delete_cluster ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "teardown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/dataproc/example_dataproc_presto.py b/providers/tests/system/google/cloud/dataproc/example_dataproc_presto.py index f5bdf25732a5e..ea8ccb231df9d 100644 --- a/providers/tests/system/google/cloud/dataproc/example_dataproc_presto.py +++ b/providers/tests/system/google/cloud/dataproc/example_dataproc_presto.py @@ -115,14 +115,14 @@ >> delete_cluster ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "teardown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/dataproc/example_dataproc_pyspark.py b/providers/tests/system/google/cloud/dataproc/example_dataproc_pyspark.py index 71e7245b7d728..fdc22d8cae6d9 100644 --- a/providers/tests/system/google/cloud/dataproc/example_dataproc_pyspark.py +++ b/providers/tests/system/google/cloud/dataproc/example_dataproc_pyspark.py @@ -140,14 +140,14 @@ >> delete_bucket ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "teardown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/dataproc/example_dataproc_spark.py b/providers/tests/system/google/cloud/dataproc/example_dataproc_spark.py index e43a56d230bf4..5ff5ce8ed4ed2 100644 --- a/providers/tests/system/google/cloud/dataproc/example_dataproc_spark.py +++ b/providers/tests/system/google/cloud/dataproc/example_dataproc_spark.py @@ -111,14 +111,14 @@ >> delete_cluster ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "teardown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/dataproc/example_dataproc_spark_async.py b/providers/tests/system/google/cloud/dataproc/example_dataproc_spark_async.py index 475e9912e8562..df3d969079255 100644 --- a/providers/tests/system/google/cloud/dataproc/example_dataproc_spark_async.py +++ b/providers/tests/system/google/cloud/dataproc/example_dataproc_spark_async.py @@ -121,14 +121,14 @@ >> delete_cluster ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "teardown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/dataproc/example_dataproc_spark_deferrable.py b/providers/tests/system/google/cloud/dataproc/example_dataproc_spark_deferrable.py index 5e6d0b773af6f..20b68b0574b89 100644 --- a/providers/tests/system/google/cloud/dataproc/example_dataproc_spark_deferrable.py +++ b/providers/tests/system/google/cloud/dataproc/example_dataproc_spark_deferrable.py @@ -112,14 +112,14 @@ >> delete_cluster ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "teardown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/dataproc/example_dataproc_spark_sql.py b/providers/tests/system/google/cloud/dataproc/example_dataproc_spark_sql.py index aef860a0e545a..3b34b8dbb298d 100644 --- a/providers/tests/system/google/cloud/dataproc/example_dataproc_spark_sql.py +++ b/providers/tests/system/google/cloud/dataproc/example_dataproc_spark_sql.py @@ -108,14 +108,14 @@ >> delete_cluster ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "teardown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/dataproc/example_dataproc_sparkr.py b/providers/tests/system/google/cloud/dataproc/example_dataproc_sparkr.py index 7b416ade38648..39890a501b0bc 100644 --- a/providers/tests/system/google/cloud/dataproc/example_dataproc_sparkr.py +++ b/providers/tests/system/google/cloud/dataproc/example_dataproc_sparkr.py @@ -136,14 +136,14 @@ >> delete_bucket ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "teardown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/dataproc/example_dataproc_trino.py b/providers/tests/system/google/cloud/dataproc/example_dataproc_trino.py index d3f7f2a1a3a4c..3f366f6088d95 100644 --- a/providers/tests/system/google/cloud/dataproc/example_dataproc_trino.py +++ b/providers/tests/system/google/cloud/dataproc/example_dataproc_trino.py @@ -117,14 +117,14 @@ >> delete_cluster ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "teardown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/dataproc/example_dataproc_workflow.py b/providers/tests/system/google/cloud/dataproc/example_dataproc_workflow.py index ab465a124d5fd..eba4ca34a7f33 100644 --- a/providers/tests/system/google/cloud/dataproc/example_dataproc_workflow.py +++ b/providers/tests/system/google/cloud/dataproc/example_dataproc_workflow.py @@ -104,14 +104,14 @@ >> instantiate_inline_workflow_template ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "teardown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/dataproc/example_dataproc_workflow_deferrable.py b/providers/tests/system/google/cloud/dataproc/example_dataproc_workflow_deferrable.py index e2319a35a124f..26dd27efcb836 100644 --- a/providers/tests/system/google/cloud/dataproc/example_dataproc_workflow_deferrable.py +++ b/providers/tests/system/google/cloud/dataproc/example_dataproc_workflow_deferrable.py @@ -108,14 +108,14 @@ >> instantiate_inline_workflow_template_async ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "teardown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/dataproc_metastore/example_dataproc_metastore.py b/providers/tests/system/google/cloud/dataproc_metastore/example_dataproc_metastore.py index ee3b5b70ad519..cbd612ba80162 100644 --- a/providers/tests/system/google/cloud/dataproc_metastore/example_dataproc_metastore.py +++ b/providers/tests/system/google/cloud/dataproc_metastore/example_dataproc_metastore.py @@ -192,14 +192,14 @@ >> delete_bucket ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "teardown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/dataproc_metastore/example_dataproc_metastore_backup.py b/providers/tests/system/google/cloud/dataproc_metastore/example_dataproc_metastore_backup.py index 12af45d210653..dddb69bfd0827 100644 --- a/providers/tests/system/google/cloud/dataproc_metastore/example_dataproc_metastore_backup.py +++ b/providers/tests/system/google/cloud/dataproc_metastore/example_dataproc_metastore_backup.py @@ -126,14 +126,14 @@ ) (create_service >> backup_service >> list_backups >> restore_service >> delete_backup >> delete_service) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "teardown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/dataproc_metastore/example_dataproc_metastore_hive_partition_sensor.py b/providers/tests/system/google/cloud/dataproc_metastore/example_dataproc_metastore_hive_partition_sensor.py index 6b06b868c73e2..f3317b9ce7f19 100644 --- a/providers/tests/system/google/cloud/dataproc_metastore/example_dataproc_metastore_hive_partition_sensor.py +++ b/providers/tests/system/google/cloud/dataproc_metastore/example_dataproc_metastore_hive_partition_sensor.py @@ -232,14 +232,14 @@ def get_hive_warehouse_bucket(**kwargs): >> [delete_dataproc_cluster, delete_metastore_service, delete_warehouse_bucket] ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "teardown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/datastore/example_datastore_commit.py b/providers/tests/system/google/cloud/datastore/example_datastore_commit.py index 430d176ed733c..60ec53cf1f8a4 100644 --- a/providers/tests/system/google/cloud/datastore/example_datastore_commit.py +++ b/providers/tests/system/google/cloud/datastore/example_datastore_commit.py @@ -160,14 +160,14 @@ [delete_bucket, delete_export_operation, delete_import_operation], ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/datastore/example_datastore_query.py b/providers/tests/system/google/cloud/datastore/example_datastore_query.py index 0b282a1feb34e..f6908823a8b28 100644 --- a/providers/tests/system/google/cloud/datastore/example_datastore_query.py +++ b/providers/tests/system/google/cloud/datastore/example_datastore_query.py @@ -80,14 +80,14 @@ allocate_ids >> begin_transaction_query >> run_query - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/datastore/example_datastore_rollback.py b/providers/tests/system/google/cloud/datastore/example_datastore_rollback.py index 44d0dc1709418..0634eabeb553d 100644 --- a/providers/tests/system/google/cloud/datastore/example_datastore_rollback.py +++ b/providers/tests/system/google/cloud/datastore/example_datastore_rollback.py @@ -63,14 +63,14 @@ begin_transaction_to_rollback >> rollback_transaction - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/gcs/example_calendar_to_gcs.py b/providers/tests/system/google/cloud/gcs/example_calendar_to_gcs.py index f44e7315e2d18..3b3cd028897df 100644 --- a/providers/tests/system/google/cloud/gcs/example_calendar_to_gcs.py +++ b/providers/tests/system/google/cloud/gcs/example_calendar_to_gcs.py @@ -115,13 +115,13 @@ def delete_connection(connection_id: str) -> None: >> delete_bucket ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/gcs/example_firestore.py b/providers/tests/system/google/cloud/gcs/example_firestore.py index 89e0e3fe1c6d9..1860d30c0d5aa 100644 --- a/providers/tests/system/google/cloud/gcs/example_firestore.py +++ b/providers/tests/system/google/cloud/gcs/example_firestore.py @@ -170,14 +170,14 @@ >> [delete_dataset, delete_bucket] ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/gcs/example_gcs_acl.py b/providers/tests/system/google/cloud/gcs/example_gcs_acl.py index 7843c0877c1d9..7000ac4d45551 100644 --- a/providers/tests/system/google/cloud/gcs/example_gcs_acl.py +++ b/providers/tests/system/google/cloud/gcs/example_gcs_acl.py @@ -108,14 +108,14 @@ >> delete_bucket ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/gcs/example_gcs_copy_delete.py b/providers/tests/system/google/cloud/gcs/example_gcs_copy_delete.py index 6bbec540df9f2..62c31d80b286b 100644 --- a/providers/tests/system/google/cloud/gcs/example_gcs_copy_delete.py +++ b/providers/tests/system/google/cloud/gcs/example_gcs_copy_delete.py @@ -122,14 +122,14 @@ [delete_bucket_src, delete_bucket_dst], ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/gcs/example_gcs_sensor.py b/providers/tests/system/google/cloud/gcs/example_gcs_sensor.py index 2d4da2887d4e5..a07aff849e465 100644 --- a/providers/tests/system/google/cloud/gcs/example_gcs_sensor.py +++ b/providers/tests/system/google/cloud/gcs/example_gcs_sensor.py @@ -201,14 +201,14 @@ def mode_setter(self, value): delete_bucket, ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/gcs/example_gcs_to_bigquery.py b/providers/tests/system/google/cloud/gcs/example_gcs_to_bigquery.py index 5d7e393bff29e..efea506c909d1 100644 --- a/providers/tests/system/google/cloud/gcs/example_gcs_to_bigquery.py +++ b/providers/tests/system/google/cloud/gcs/example_gcs_to_bigquery.py @@ -82,13 +82,13 @@ >> delete_test_dataset ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/gcs/example_gcs_to_bigquery_async.py b/providers/tests/system/google/cloud/gcs/example_gcs_to_bigquery_async.py index 1ca531b818008..7572f2bc559d3 100644 --- a/providers/tests/system/google/cloud/gcs/example_gcs_to_bigquery_async.py +++ b/providers/tests/system/google/cloud/gcs/example_gcs_to_bigquery_async.py @@ -174,13 +174,13 @@ >> delete_test_dataset_delimiter ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/gcs/example_gcs_to_gcs.py b/providers/tests/system/google/cloud/gcs/example_gcs_to_gcs.py index ac1d70307a535..c4c812868efa3 100644 --- a/providers/tests/system/google/cloud/gcs/example_gcs_to_gcs.py +++ b/providers/tests/system/google/cloud/gcs/example_gcs_to_gcs.py @@ -275,14 +275,14 @@ def delete_work_dir(create_workdir_result: str) -> None: [delete_bucket_src, delete_bucket_dst, delete_work_dir(create_workdir_task)], ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/gcs/example_gcs_to_gdrive.py b/providers/tests/system/google/cloud/gcs/example_gcs_to_gdrive.py index bfb200a15a63d..c15e24ff3fbac 100644 --- a/providers/tests/system/google/cloud/gcs/example_gcs_to_gdrive.py +++ b/providers/tests/system/google/cloud/gcs/example_gcs_to_gdrive.py @@ -204,13 +204,13 @@ def delete_connection(connection_id: str) -> None: >> [delete_bucket, delete_connection_task] ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/gcs/example_gcs_to_sheets.py b/providers/tests/system/google/cloud/gcs/example_gcs_to_sheets.py index 69947698cd7bb..991f8347f5da2 100644 --- a/providers/tests/system/google/cloud/gcs/example_gcs_to_sheets.py +++ b/providers/tests/system/google/cloud/gcs/example_gcs_to_sheets.py @@ -131,13 +131,13 @@ def delete_connection(connection_id: str) -> None: >> [delete_bucket, delete_connection_task] ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/gcs/example_gcs_transform.py b/providers/tests/system/google/cloud/gcs/example_gcs_transform.py index 0b59119c6bc1e..421272f8b5775 100644 --- a/providers/tests/system/google/cloud/gcs/example_gcs_transform.py +++ b/providers/tests/system/google/cloud/gcs/example_gcs_transform.py @@ -95,14 +95,14 @@ >> delete_bucket ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/gcs/example_gcs_transform_timespan.py b/providers/tests/system/google/cloud/gcs/example_gcs_transform_timespan.py index 3a5b03695ee40..1c7e68b9d1252 100644 --- a/providers/tests/system/google/cloud/gcs/example_gcs_transform_timespan.py +++ b/providers/tests/system/google/cloud/gcs/example_gcs_transform_timespan.py @@ -114,14 +114,14 @@ [delete_bucket_src, delete_bucket_dst], ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/gcs/example_gcs_upload_download.py b/providers/tests/system/google/cloud/gcs/example_gcs_upload_download.py index 6907a29fb5389..abde62d35bfaa 100644 --- a/providers/tests/system/google/cloud/gcs/example_gcs_upload_download.py +++ b/providers/tests/system/google/cloud/gcs/example_gcs_upload_download.py @@ -92,14 +92,14 @@ >> delete_bucket ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/gcs/example_gdrive_to_gcs.py b/providers/tests/system/google/cloud/gcs/example_gdrive_to_gcs.py index 6ee188bd957ec..39633a8fc2bd4 100644 --- a/providers/tests/system/google/cloud/gcs/example_gdrive_to_gcs.py +++ b/providers/tests/system/google/cloud/gcs/example_gdrive_to_gcs.py @@ -165,13 +165,13 @@ def delete_connection(connection_id: str) -> None: >> [delete_bucket, delete_connection_task] ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/gcs/example_mssql_to_gcs.py b/providers/tests/system/google/cloud/gcs/example_mssql_to_gcs.py index bc6ac79f1e0b1..7aece3764c7f1 100644 --- a/providers/tests/system/google/cloud/gcs/example_mssql_to_gcs.py +++ b/providers/tests/system/google/cloud/gcs/example_mssql_to_gcs.py @@ -78,14 +78,14 @@ >> delete_bucket ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/gcs/example_mysql_to_gcs.py b/providers/tests/system/google/cloud/gcs/example_mysql_to_gcs.py index cc53337e56934..ae3fea2c236e5 100644 --- a/providers/tests/system/google/cloud/gcs/example_mysql_to_gcs.py +++ b/providers/tests/system/google/cloud/gcs/example_mysql_to_gcs.py @@ -295,13 +295,13 @@ def delete_connection(connection_id: str) -> None: mysql_to_gcs >> [delete_gcs_bucket, delete_firewall_rule, delete_gce_instance, delete_connection_task] delete_gce_instance >> delete_persistent_disk - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/gcs/example_oracle_to_gcs.py b/providers/tests/system/google/cloud/gcs/example_oracle_to_gcs.py index c727eef1f66fb..ba4d7025acfab 100644 --- a/providers/tests/system/google/cloud/gcs/example_oracle_to_gcs.py +++ b/providers/tests/system/google/cloud/gcs/example_oracle_to_gcs.py @@ -64,13 +64,13 @@ >> delete_bucket ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/gcs/example_s3_to_gcs.py b/providers/tests/system/google/cloud/gcs/example_s3_to_gcs.py index 487dbbce552e2..59f88f78b276a 100644 --- a/providers/tests/system/google/cloud/gcs/example_s3_to_gcs.py +++ b/providers/tests/system/google/cloud/gcs/example_s3_to_gcs.py @@ -110,14 +110,14 @@ def upload_file(): >> delete_gcs_bucket ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/gcs/example_sftp_to_gcs.py b/providers/tests/system/google/cloud/gcs/example_sftp_to_gcs.py index 994e7e8242e1e..b2c250426528a 100644 --- a/providers/tests/system/google/cloud/gcs/example_sftp_to_gcs.py +++ b/providers/tests/system/google/cloud/gcs/example_sftp_to_gcs.py @@ -119,14 +119,14 @@ delete_bucket, ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/gcs/example_sheets.py b/providers/tests/system/google/cloud/gcs/example_sheets.py index 7d17379819168..001ebb69d6820 100644 --- a/providers/tests/system/google/cloud/gcs/example_sheets.py +++ b/providers/tests/system/google/cloud/gcs/example_sheets.py @@ -145,13 +145,13 @@ def delete_connection(connection_id: str) -> None: >> [delete_bucket, delete_connection_task] ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/gcs/example_sheets_to_gcs.py b/providers/tests/system/google/cloud/gcs/example_sheets_to_gcs.py index 08688c332563a..7c546060333c1 100644 --- a/providers/tests/system/google/cloud/gcs/example_sheets_to_gcs.py +++ b/providers/tests/system/google/cloud/gcs/example_sheets_to_gcs.py @@ -120,13 +120,13 @@ def delete_connection(connection_id: str) -> None: >> [delete_bucket, delete_connection_task] ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/gcs/example_trino_to_gcs.py b/providers/tests/system/google/cloud/gcs/example_trino_to_gcs.py index af92e550481f7..e76a66ea22be3 100644 --- a/providers/tests/system/google/cloud/gcs/example_trino_to_gcs.py +++ b/providers/tests/system/google/cloud/gcs/example_trino_to_gcs.py @@ -221,13 +221,13 @@ def safe_name(s: str) -> str: >> [delete_dataset, delete_bucket] ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/kubernetes_engine/example_kubernetes_engine.py b/providers/tests/system/google/cloud/kubernetes_engine/example_kubernetes_engine.py index e9fe3f6836b94..36d21ff701eb3 100644 --- a/providers/tests/system/google/cloud/kubernetes_engine/example_kubernetes_engine.py +++ b/providers/tests/system/google/cloud/kubernetes_engine/example_kubernetes_engine.py @@ -113,14 +113,14 @@ create_cluster >> [pod_task, pod_task_xcom] >> delete_cluster pod_task_xcom >> pod_task_xcom_result - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "teardown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/kubernetes_engine/example_kubernetes_engine_async.py b/providers/tests/system/google/cloud/kubernetes_engine/example_kubernetes_engine_async.py index f5cb8f570754f..9283f77dbd2a9 100644 --- a/providers/tests/system/google/cloud/kubernetes_engine/example_kubernetes_engine_async.py +++ b/providers/tests/system/google/cloud/kubernetes_engine/example_kubernetes_engine_async.py @@ -116,14 +116,14 @@ create_cluster >> [pod_task, pod_task_xcom_async] >> delete_cluster pod_task_xcom_async >> pod_task_xcom_result - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "teardown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/kubernetes_engine/example_kubernetes_engine_job.py b/providers/tests/system/google/cloud/kubernetes_engine/example_kubernetes_engine_job.py index a4c56c17e5baf..9ff3ef32a7c09 100644 --- a/providers/tests/system/google/cloud/kubernetes_engine/example_kubernetes_engine_job.py +++ b/providers/tests/system/google/cloud/kubernetes_engine/example_kubernetes_engine_job.py @@ -179,14 +179,14 @@ delete_cluster, ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "teardown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/kubernetes_engine/example_kubernetes_engine_kueue.py b/providers/tests/system/google/cloud/kubernetes_engine/example_kubernetes_engine_kueue.py index 06c23432a923a..44dbaae5537b2 100644 --- a/providers/tests/system/google/cloud/kubernetes_engine/example_kubernetes_engine_kueue.py +++ b/providers/tests/system/google/cloud/kubernetes_engine/example_kubernetes_engine_kueue.py @@ -179,14 +179,14 @@ >> delete_cluster ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "teardown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/kubernetes_engine/example_kubernetes_engine_resource.py b/providers/tests/system/google/cloud/kubernetes_engine/example_kubernetes_engine_resource.py index 784ba994862b7..28a6ac985b6ee 100644 --- a/providers/tests/system/google/cloud/kubernetes_engine/example_kubernetes_engine_resource.py +++ b/providers/tests/system/google/cloud/kubernetes_engine/example_kubernetes_engine_resource.py @@ -101,14 +101,14 @@ create_cluster >> create_resource_task >> delete_resource_task >> delete_cluster - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "teardown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/life_sciences/example_life_sciences.py b/providers/tests/system/google/cloud/life_sciences/example_life_sciences.py index 170eeb39ad1aa..e5024562b70a8 100644 --- a/providers/tests/system/google/cloud/life_sciences/example_life_sciences.py +++ b/providers/tests/system/google/cloud/life_sciences/example_life_sciences.py @@ -131,14 +131,14 @@ delete_bucket, ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/ml_engine/example_mlengine.py b/providers/tests/system/google/cloud/ml_engine/example_mlengine.py index f0eaf7cb30171..a735d3015ab55 100644 --- a/providers/tests/system/google/cloud/ml_engine/example_mlengine.py +++ b/providers/tests/system/google/cloud/ml_engine/example_mlengine.py @@ -280,13 +280,13 @@ >> delete_bucket ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/natural_language/example_natural_language.py b/providers/tests/system/google/cloud/natural_language/example_natural_language.py index cc1aba0f165c7..4eb542d9aecce 100644 --- a/providers/tests/system/google/cloud/natural_language/example_natural_language.py +++ b/providers/tests/system/google/cloud/natural_language/example_natural_language.py @@ -119,13 +119,13 @@ analyze_sentiment >> analyze_sentiment_result analyze_classify_text >> analyze_classify_text_result - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "teardown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/pubsub/example_pubsub.py b/providers/tests/system/google/cloud/pubsub/example_pubsub.py index 93ab1cde6e0a8..9ff909a3b401f 100644 --- a/providers/tests/system/google/cloud/pubsub/example_pubsub.py +++ b/providers/tests/system/google/cloud/pubsub/example_pubsub.py @@ -146,14 +146,14 @@ # ### Everything below this line is not part of example ### # ### Just for system tests purpose ### - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/pubsub/example_pubsub_deferrable.py b/providers/tests/system/google/cloud/pubsub/example_pubsub_deferrable.py index a902ea5617f6d..f889ff16a286e 100644 --- a/providers/tests/system/google/cloud/pubsub/example_pubsub_deferrable.py +++ b/providers/tests/system/google/cloud/pubsub/example_pubsub_deferrable.py @@ -101,14 +101,14 @@ # ### Everything below this line is not part of example ### # ### Just for system tests purpose ### - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/spanner/example_spanner.py b/providers/tests/system/google/cloud/spanner/example_spanner.py index b11a5cd61f92c..ba9f727e1f6dc 100644 --- a/providers/tests/system/google/cloud/spanner/example_spanner.py +++ b/providers/tests/system/google/cloud/spanner/example_spanner.py @@ -161,14 +161,14 @@ # ### Everything below this line is not part of example ### # ### Just for system tests purpose ### - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/speech_to_text/example_speech_to_text.py b/providers/tests/system/google/cloud/speech_to_text/example_speech_to_text.py index f2382a6053aa4..16603bf65a86d 100644 --- a/providers/tests/system/google/cloud/speech_to_text/example_speech_to_text.py +++ b/providers/tests/system/google/cloud/speech_to_text/example_speech_to_text.py @@ -89,14 +89,14 @@ >> delete_bucket ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/sql_to_sheets/example_sql_to_sheets.py b/providers/tests/system/google/cloud/sql_to_sheets/example_sql_to_sheets.py index d34531ba52a0a..65c88b38ccf30 100644 --- a/providers/tests/system/google/cloud/sql_to_sheets/example_sql_to_sheets.py +++ b/providers/tests/system/google/cloud/sql_to_sheets/example_sql_to_sheets.py @@ -315,13 +315,13 @@ def delete_connection(connection_id: str) -> None: ] delete_gce_instance >> delete_persistent_disk - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/stackdriver/example_stackdriver.py b/providers/tests/system/google/cloud/stackdriver/example_stackdriver.py index 202c9bcfbdccf..e720ac1f16594 100644 --- a/providers/tests/system/google/cloud/stackdriver/example_stackdriver.py +++ b/providers/tests/system/google/cloud/stackdriver/example_stackdriver.py @@ -228,13 +228,13 @@ delete_alert_policy_2, ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/storage_transfer/example_cloud_storage_transfer_service_aws.py b/providers/tests/system/google/cloud/storage_transfer/example_cloud_storage_transfer_service_aws.py index 4d6a010954401..cf76f6eddd58b 100644 --- a/providers/tests/system/google/cloud/storage_transfer/example_cloud_storage_transfer_service_aws.py +++ b/providers/tests/system/google/cloud/storage_transfer/example_cloud_storage_transfer_service_aws.py @@ -254,14 +254,14 @@ ] ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/storage_transfer/example_cloud_storage_transfer_service_gcp.py b/providers/tests/system/google/cloud/storage_transfer/example_cloud_storage_transfer_service_gcp.py index b2cef2f831b5f..960a9c0679a9b 100644 --- a/providers/tests/system/google/cloud/storage_transfer/example_cloud_storage_transfer_service_gcp.py +++ b/providers/tests/system/google/cloud/storage_transfer/example_cloud_storage_transfer_service_gcp.py @@ -195,13 +195,13 @@ >> [delete_transfer, delete_bucket_src, delete_bucket_dst] ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/storage_transfer/example_cloud_storage_transfer_service_gcs_to_gcs.py b/providers/tests/system/google/cloud/storage_transfer/example_cloud_storage_transfer_service_gcs_to_gcs.py index e670eba755428..46289ea66ca23 100644 --- a/providers/tests/system/google/cloud/storage_transfer/example_cloud_storage_transfer_service_gcs_to_gcs.py +++ b/providers/tests/system/google/cloud/storage_transfer/example_cloud_storage_transfer_service_gcs_to_gcs.py @@ -106,13 +106,13 @@ >> [delete_bucket_src, delete_bucket_dst] ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/tasks/example_queue.py b/providers/tests/system/google/cloud/tasks/example_queue.py index 9797a29d04e22..614bdfd352073 100644 --- a/providers/tests/system/google/cloud/tasks/example_queue.py +++ b/providers/tests/system/google/cloud/tasks/example_queue.py @@ -161,14 +161,14 @@ def generate_random_string(): delete_queue, ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/tasks/example_tasks.py b/providers/tests/system/google/cloud/tasks/example_tasks.py index 0eae95fd1075d..f4ab2f53b0bb4 100644 --- a/providers/tests/system/google/cloud/tasks/example_tasks.py +++ b/providers/tests/system/google/cloud/tasks/example_tasks.py @@ -152,14 +152,14 @@ def generate_random_string(): random_string, create_queue, create_task, tasks_get, list_tasks, run_task, delete_task, delete_queue ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/text_to_speech/example_text_to_speech.py b/providers/tests/system/google/cloud/text_to_speech/example_text_to_speech.py index 0227049508a74..437db735c2d57 100644 --- a/providers/tests/system/google/cloud/text_to_speech/example_text_to_speech.py +++ b/providers/tests/system/google/cloud/text_to_speech/example_text_to_speech.py @@ -78,14 +78,14 @@ >> delete_bucket ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/transfers/example_gcs_to_sftp.py b/providers/tests/system/google/cloud/transfers/example_gcs_to_sftp.py index 8d3f19416313a..dd1a5945f2cc7 100644 --- a/providers/tests/system/google/cloud/transfers/example_gcs_to_sftp.py +++ b/providers/tests/system/google/cloud/transfers/example_gcs_to_sftp.py @@ -171,14 +171,14 @@ >> delete_bucket ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/transfers/example_gdrive_to_local.py b/providers/tests/system/google/cloud/transfers/example_gdrive_to_local.py index abfcbabce0852..2e5c6f8e8f7eb 100644 --- a/providers/tests/system/google/cloud/transfers/example_gdrive_to_local.py +++ b/providers/tests/system/google/cloud/transfers/example_gdrive_to_local.py @@ -167,13 +167,13 @@ def delete_connection(connection_id: str) -> None: >> [delete_bucket, delete_connection_task] ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/transfers/example_postgres_to_gcs.py b/providers/tests/system/google/cloud/transfers/example_postgres_to_gcs.py index 91bde027982ec..0f9d5be7eaeec 100644 --- a/providers/tests/system/google/cloud/transfers/example_postgres_to_gcs.py +++ b/providers/tests/system/google/cloud/transfers/example_postgres_to_gcs.py @@ -290,13 +290,13 @@ def delete_connection(connection_id: str) -> None: postgres_to_gcs >> [delete_gcs_bucket, delete_firewall_rule, delete_gce_instance, delete_connection_task] delete_gce_instance >> delete_persistent_disk - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/translate/example_translate.py b/providers/tests/system/google/cloud/translate/example_translate.py index 13a3ee061e308..44af8bf5d1d12 100644 --- a/providers/tests/system/google/cloud/translate/example_translate.py +++ b/providers/tests/system/google/cloud/translate/example_translate.py @@ -56,14 +56,14 @@ # ### Everything below this line is not part of example ### # ### Just for system tests purpose ### - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/translate_speech/example_translate_speech.py b/providers/tests/system/google/cloud/translate_speech/example_translate_speech.py index 4fe34d0b86f57..2e023d68ae537 100644 --- a/providers/tests/system/google/cloud/translate_speech/example_translate_speech.py +++ b/providers/tests/system/google/cloud/translate_speech/example_translate_speech.py @@ -110,14 +110,14 @@ >> delete_bucket ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/vertex_ai/example_vertex_ai_auto_ml_forecasting_training.py b/providers/tests/system/google/cloud/vertex_ai/example_vertex_ai_auto_ml_forecasting_training.py index 8dd0ecc9c9550..e22622dd58605 100644 --- a/providers/tests/system/google/cloud/vertex_ai/example_vertex_ai_auto_ml_forecasting_training.py +++ b/providers/tests/system/google/cloud/vertex_ai/example_vertex_ai_auto_ml_forecasting_training.py @@ -150,13 +150,13 @@ # ### Everything below this line is not part of example ### # ### Just for system tests purpose ### - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/vertex_ai/example_vertex_ai_auto_ml_image_training.py b/providers/tests/system/google/cloud/vertex_ai/example_vertex_ai_auto_ml_image_training.py index bf96da992aca1..77629b0bc78c1 100644 --- a/providers/tests/system/google/cloud/vertex_ai/example_vertex_ai_auto_ml_image_training.py +++ b/providers/tests/system/google/cloud/vertex_ai/example_vertex_ai_auto_ml_image_training.py @@ -135,13 +135,13 @@ # ### Everything below this line is not part of example ### # ### Just for system tests purpose ### - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/vertex_ai/example_vertex_ai_auto_ml_list_training.py b/providers/tests/system/google/cloud/vertex_ai/example_vertex_ai_auto_ml_list_training.py index ca6c65e1a6ddd..cd75035793af0 100644 --- a/providers/tests/system/google/cloud/vertex_ai/example_vertex_ai_auto_ml_list_training.py +++ b/providers/tests/system/google/cloud/vertex_ai/example_vertex_ai_auto_ml_list_training.py @@ -52,13 +52,13 @@ # ### Everything below this line is not part of example ### # ### Just for system tests purpose ### - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/vertex_ai/example_vertex_ai_auto_ml_tabular_training.py b/providers/tests/system/google/cloud/vertex_ai/example_vertex_ai_auto_ml_tabular_training.py index fb32c7475c7f1..106e622abad5e 100644 --- a/providers/tests/system/google/cloud/vertex_ai/example_vertex_ai_auto_ml_tabular_training.py +++ b/providers/tests/system/google/cloud/vertex_ai/example_vertex_ai_auto_ml_tabular_training.py @@ -140,13 +140,13 @@ # ### Everything below this line is not part of example ### # ### Just for system tests purpose ### - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/vertex_ai/example_vertex_ai_auto_ml_video_training.py b/providers/tests/system/google/cloud/vertex_ai/example_vertex_ai_auto_ml_video_training.py index 6c3db89382f24..ea68e55fa2605 100644 --- a/providers/tests/system/google/cloud/vertex_ai/example_vertex_ai_auto_ml_video_training.py +++ b/providers/tests/system/google/cloud/vertex_ai/example_vertex_ai_auto_ml_video_training.py @@ -145,13 +145,13 @@ # ### Everything below this line is not part of example ### # ### Just for system tests purpose ### - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/vertex_ai/example_vertex_ai_batch_prediction_job.py b/providers/tests/system/google/cloud/vertex_ai/example_vertex_ai_batch_prediction_job.py index 78bb9ffa6bad4..06a56f379654f 100644 --- a/providers/tests/system/google/cloud/vertex_ai/example_vertex_ai_batch_prediction_job.py +++ b/providers/tests/system/google/cloud/vertex_ai/example_vertex_ai_batch_prediction_job.py @@ -231,13 +231,13 @@ # ### Everything below this line is not part of example ### # ### Just for system tests purpose ### - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/vertex_ai/example_vertex_ai_custom_container.py b/providers/tests/system/google/cloud/vertex_ai/example_vertex_ai_custom_container.py index 1295d20983eeb..316e0d3a7cbbe 100644 --- a/providers/tests/system/google/cloud/vertex_ai/example_vertex_ai_custom_container.py +++ b/providers/tests/system/google/cloud/vertex_ai/example_vertex_ai_custom_container.py @@ -208,13 +208,13 @@ def TABULAR_DATASET(bucket_name): # ### Everything below this line is not part of example ### # ### Just for system tests purpose ### - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/vertex_ai/example_vertex_ai_custom_job.py b/providers/tests/system/google/cloud/vertex_ai/example_vertex_ai_custom_job.py index 3fa6169cb2759..eb2a080a92a1f 100644 --- a/providers/tests/system/google/cloud/vertex_ai/example_vertex_ai_custom_job.py +++ b/providers/tests/system/google/cloud/vertex_ai/example_vertex_ai_custom_job.py @@ -250,13 +250,13 @@ def TABULAR_DATASET(bucket_name): # ### Everything below this line is not part of example ### # ### Just for system tests purpose ### - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/vertex_ai/example_vertex_ai_custom_job_python_package.py b/providers/tests/system/google/cloud/vertex_ai/example_vertex_ai_custom_job_python_package.py index fbc40b888216b..f1b471d446262 100644 --- a/providers/tests/system/google/cloud/vertex_ai/example_vertex_ai_custom_job_python_package.py +++ b/providers/tests/system/google/cloud/vertex_ai/example_vertex_ai_custom_job_python_package.py @@ -211,13 +211,13 @@ def TABULAR_DATASET(bucket_name): # ### Everything below this line is not part of example ### # ### Just for system tests purpose ### - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/vertex_ai/example_vertex_ai_dataset.py b/providers/tests/system/google/cloud/vertex_ai/example_vertex_ai_dataset.py index 3e1b98a2232d1..af4fbb88c2b90 100644 --- a/providers/tests/system/google/cloud/vertex_ai/example_vertex_ai_dataset.py +++ b/providers/tests/system/google/cloud/vertex_ai/example_vertex_ai_dataset.py @@ -269,13 +269,13 @@ # ### Everything below this line is not part of example ### # ### Just for system tests purpose ### - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/vertex_ai/example_vertex_ai_endpoint.py b/providers/tests/system/google/cloud/vertex_ai/example_vertex_ai_endpoint.py index 12b1181a79280..13e24b869c79e 100644 --- a/providers/tests/system/google/cloud/vertex_ai/example_vertex_ai_endpoint.py +++ b/providers/tests/system/google/cloud/vertex_ai/example_vertex_ai_endpoint.py @@ -206,13 +206,13 @@ # ### Everything below this line is not part of example ### # ### Just for system tests purpose ### - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/vertex_ai/example_vertex_ai_generative_model.py b/providers/tests/system/google/cloud/vertex_ai/example_vertex_ai_generative_model.py index 7e696184eef41..a1140afc1983f 100644 --- a/providers/tests/system/google/cloud/vertex_ai/example_vertex_ai_generative_model.py +++ b/providers/tests/system/google/cloud/vertex_ai/example_vertex_ai_generative_model.py @@ -155,14 +155,14 @@ ) # [END how_to_cloud_vertex_ai_run_evaluation_operator] - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/vertex_ai/example_vertex_ai_generative_model_tuning.py b/providers/tests/system/google/cloud/vertex_ai/example_vertex_ai_generative_model_tuning.py index affba0b6aede8..9ce1c77350e67 100644 --- a/providers/tests/system/google/cloud/vertex_ai/example_vertex_ai_generative_model_tuning.py +++ b/providers/tests/system/google/cloud/vertex_ai/example_vertex_ai_generative_model_tuning.py @@ -56,13 +56,13 @@ ) # [END how_to_cloud_vertex_ai_supervised_fine_tuning_train_operator] - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/vertex_ai/example_vertex_ai_hyperparameter_tuning_job.py b/providers/tests/system/google/cloud/vertex_ai/example_vertex_ai_hyperparameter_tuning_job.py index 55254741d9cc2..4fabdbc6ac67b 100644 --- a/providers/tests/system/google/cloud/vertex_ai/example_vertex_ai_hyperparameter_tuning_job.py +++ b/providers/tests/system/google/cloud/vertex_ai/example_vertex_ai_hyperparameter_tuning_job.py @@ -181,13 +181,13 @@ # ### Everything below this line is not part of example ### # ### Just for system tests purpose ### - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/vertex_ai/example_vertex_ai_list_custom_jobs.py b/providers/tests/system/google/cloud/vertex_ai/example_vertex_ai_list_custom_jobs.py index 75de719b6aa9e..230aeca14a67f 100644 --- a/providers/tests/system/google/cloud/vertex_ai/example_vertex_ai_list_custom_jobs.py +++ b/providers/tests/system/google/cloud/vertex_ai/example_vertex_ai_list_custom_jobs.py @@ -51,13 +51,13 @@ # ### Everything below this line is not part of example ### # ### Just for system tests purpose ### - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/vertex_ai/example_vertex_ai_model_service.py b/providers/tests/system/google/cloud/vertex_ai/example_vertex_ai_model_service.py index 3ad5537a10c29..272069b2f87f0 100644 --- a/providers/tests/system/google/cloud/vertex_ai/example_vertex_ai_model_service.py +++ b/providers/tests/system/google/cloud/vertex_ai/example_vertex_ai_model_service.py @@ -345,13 +345,13 @@ # ### Everything below this line is not part of example ### # ### Just for system tests purpose ### - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/vertex_ai/example_vertex_ai_pipeline_job.py b/providers/tests/system/google/cloud/vertex_ai/example_vertex_ai_pipeline_job.py index 5ab29ee999f16..bc97ff6a58be3 100644 --- a/providers/tests/system/google/cloud/vertex_ai/example_vertex_ai_pipeline_job.py +++ b/providers/tests/system/google/cloud/vertex_ai/example_vertex_ai_pipeline_job.py @@ -177,13 +177,13 @@ # ### Everything below this line is not part of example ### # ### Just for system tests purpose ### - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/video_intelligence/example_video_intelligence.py b/providers/tests/system/google/cloud/video_intelligence/example_video_intelligence.py index e630fd1471a8a..21ee27cd9be76 100644 --- a/providers/tests/system/google/cloud/video_intelligence/example_video_intelligence.py +++ b/providers/tests/system/google/cloud/video_intelligence/example_video_intelligence.py @@ -154,14 +154,14 @@ delete_bucket, ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/vision/example_vision_annotate_image.py b/providers/tests/system/google/cloud/vision/example_vision_annotate_image.py index 1e09fb7fe4f9d..178920e83a433 100644 --- a/providers/tests/system/google/cloud/vision/example_vision_annotate_image.py +++ b/providers/tests/system/google/cloud/vision/example_vision_annotate_image.py @@ -191,14 +191,14 @@ delete_bucket, ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "teardown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/vision/example_vision_autogenerated.py b/providers/tests/system/google/cloud/vision/example_vision_autogenerated.py index 11fd3cdd54029..e84af0fdbac34 100644 --- a/providers/tests/system/google/cloud/vision/example_vision_autogenerated.py +++ b/providers/tests/system/google/cloud/vision/example_vision_autogenerated.py @@ -268,14 +268,14 @@ delete_bucket, ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "teardown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/vision/example_vision_explicit.py b/providers/tests/system/google/cloud/vision/example_vision_explicit.py index 0c71be95bda7a..2e480fec4f75e 100644 --- a/providers/tests/system/google/cloud/vision/example_vision_explicit.py +++ b/providers/tests/system/google/cloud/vision/example_vision_explicit.py @@ -279,14 +279,14 @@ delete_bucket, ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "teardown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/cloud/workflows/example_workflows.py b/providers/tests/system/google/cloud/workflows/example_workflows.py index 6d13484acbb42..b933d75a6f2b6 100644 --- a/providers/tests/system/google/cloud/workflows/example_workflows.py +++ b/providers/tests/system/google/cloud/workflows/example_workflows.py @@ -227,14 +227,14 @@ # ### Everything below this line is not part of example ### # ### Just for system tests purpose ### - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/datacatalog/example_datacatalog_entries.py b/providers/tests/system/google/datacatalog/example_datacatalog_entries.py index 0f84361d4fcc8..644adadeef31c 100644 --- a/providers/tests/system/google/datacatalog/example_datacatalog_entries.py +++ b/providers/tests/system/google/datacatalog/example_datacatalog_entries.py @@ -200,14 +200,14 @@ # ### Everything below this line is not part of example ### # ### Just for system tests purpose ### - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/datacatalog/example_datacatalog_search_catalog.py b/providers/tests/system/google/datacatalog/example_datacatalog_search_catalog.py index a77a023f32338..0ff6cf0716a28 100644 --- a/providers/tests/system/google/datacatalog/example_datacatalog_search_catalog.py +++ b/providers/tests/system/google/datacatalog/example_datacatalog_search_catalog.py @@ -223,14 +223,14 @@ # ### Everything below this line is not part of example ### # ### Just for system tests purpose ### - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/datacatalog/example_datacatalog_tag_templates.py b/providers/tests/system/google/datacatalog/example_datacatalog_tag_templates.py index af49d3de08fa7..19bf62c88ccd5 100644 --- a/providers/tests/system/google/datacatalog/example_datacatalog_tag_templates.py +++ b/providers/tests/system/google/datacatalog/example_datacatalog_tag_templates.py @@ -183,14 +183,14 @@ # ### Everything below this line is not part of example ### # ### Just for system tests purpose ### - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/datacatalog/example_datacatalog_tags.py b/providers/tests/system/google/datacatalog/example_datacatalog_tags.py index fdbdaa451056a..0f74b49e102ea 100644 --- a/providers/tests/system/google/datacatalog/example_datacatalog_tags.py +++ b/providers/tests/system/google/datacatalog/example_datacatalog_tags.py @@ -233,14 +233,14 @@ # ### Everything below this line is not part of example ### # ### Just for system tests purpose ### - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/leveldb/example_leveldb.py b/providers/tests/system/google/leveldb/example_leveldb.py index 8b11d9e87bebc..52a543f048e49 100644 --- a/providers/tests/system/google/leveldb/example_leveldb.py +++ b/providers/tests/system/google/leveldb/example_leveldb.py @@ -60,14 +60,14 @@ # [END howto_operator_leveldb_put_key] get_key_leveldb_task >> put_key_leveldb_task - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/marketing_platform/example_analytics_admin.py b/providers/tests/system/google/marketing_platform/example_analytics_admin.py index 16ce6f8190bdc..3536e7b945da2 100644 --- a/providers/tests/system/google/marketing_platform/example_analytics_admin.py +++ b/providers/tests/system/google/marketing_platform/example_analytics_admin.py @@ -219,13 +219,13 @@ def delete_connection(connection_id: str) -> None: # TEST TEARDOWN >> delete_connection_task ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/marketing_platform/example_campaign_manager.py b/providers/tests/system/google/marketing_platform/example_campaign_manager.py index 0c3b26e5e98b5..70e8c208d50eb 100644 --- a/providers/tests/system/google/marketing_platform/example_campaign_manager.py +++ b/providers/tests/system/google/marketing_platform/example_campaign_manager.py @@ -322,13 +322,13 @@ def delete_connection(connection_id: str) -> None: >> delete_connection(connection_id=CONNECTION_ID) ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/marketing_platform/example_search_ads.py b/providers/tests/system/google/marketing_platform/example_search_ads.py index 5d86a3ad1684d..cb733f5bcf4f3 100644 --- a/providers/tests/system/google/marketing_platform/example_search_ads.py +++ b/providers/tests/system/google/marketing_platform/example_search_ads.py @@ -102,7 +102,7 @@ (query_report >> get_field >> search_fields >> get_custom_column >> list_custom_columns) -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/google/suite/example_local_to_drive.py b/providers/tests/system/google/suite/example_local_to_drive.py index ac8ebfc5aabbc..397e65fa2bb5a 100644 --- a/providers/tests/system/google/suite/example_local_to_drive.py +++ b/providers/tests/system/google/suite/example_local_to_drive.py @@ -141,13 +141,13 @@ def delete_connection(connection_id: str) -> None: >> delete_connection_task ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/http/example_http.py b/providers/tests/system/http/example_http.py index 98423943607cd..a2900ad582461 100644 --- a/providers/tests/system/http/example_http.py +++ b/providers/tests/system/http/example_http.py @@ -157,7 +157,7 @@ def get_next_page_cursor(response) -> dict | None: task_get_op_response_filter >> task_put_op >> task_del_op >> task_post_op_formenc task_post_op_formenc >> task_get_paginated -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/influxdb/example_influxdb.py b/providers/tests/system/influxdb/example_influxdb.py index 8e4d486742d5f..9b67b05d0a6fd 100644 --- a/providers/tests/system/influxdb/example_influxdb.py +++ b/providers/tests/system/influxdb/example_influxdb.py @@ -61,13 +61,13 @@ def test_influxdb_hook(): ) as dag: test_influxdb_hook() - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/influxdb/example_influxdb_query.py b/providers/tests/system/influxdb/example_influxdb_query.py index 95940e8c8f366..8c4c548b84f4c 100644 --- a/providers/tests/system/influxdb/example_influxdb_query.py +++ b/providers/tests/system/influxdb/example_influxdb_query.py @@ -43,7 +43,7 @@ # [END howto_operator_influxdb] -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/jdbc/example_jdbc_queries.py b/providers/tests/system/jdbc/example_jdbc_queries.py index ce9234a6fb0b7..5e73c22b3cf15 100644 --- a/providers/tests/system/jdbc/example_jdbc_queries.py +++ b/providers/tests/system/jdbc/example_jdbc_queries.py @@ -59,13 +59,13 @@ delete_data >> insert_data >> run_this_last - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/jenkins/example_jenkins_job_trigger.py b/providers/tests/system/jenkins/example_jenkins_job_trigger.py index 6b7fab62a0d36..a24b48dda6c37 100644 --- a/providers/tests/system/jenkins/example_jenkins_job_trigger.py +++ b/providers/tests/system/jenkins/example_jenkins_job_trigger.py @@ -72,7 +72,7 @@ def grab_artifact_from_jenkins(url): # job_trigger >> grab_artifact_from_jenkins() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/microsoft/azure/example_adf_run_pipeline.py b/providers/tests/system/microsoft/azure/example_adf_run_pipeline.py index a6eae4d71486d..e65524b3c746b 100644 --- a/providers/tests/system/microsoft/azure/example_adf_run_pipeline.py +++ b/providers/tests/system/microsoft/azure/example_adf_run_pipeline.py @@ -108,13 +108,13 @@ # Task dependency created via `XComArgs`: # run_pipeline2 >> pipeline_run_sensor - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/microsoft/azure/example_adls_create.py b/providers/tests/system/microsoft/azure/example_adls_create.py index 3f76525b6b87e..2c5828da44603 100644 --- a/providers/tests/system/microsoft/azure/example_adls_create.py +++ b/providers/tests/system/microsoft/azure/example_adls_create.py @@ -46,13 +46,13 @@ upload_data >> delete_file - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/microsoft/azure/example_adls_delete.py b/providers/tests/system/microsoft/azure/example_adls_delete.py index 34abc6a9b2dae..fcfe1793f27eb 100644 --- a/providers/tests/system/microsoft/azure/example_adls_delete.py +++ b/providers/tests/system/microsoft/azure/example_adls_delete.py @@ -46,13 +46,13 @@ upload_file >> remove_file - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/microsoft/azure/example_adls_list.py b/providers/tests/system/microsoft/azure/example_adls_list.py index 594b161aaa9d6..26e65e0cf8d9c 100644 --- a/providers/tests/system/microsoft/azure/example_adls_list.py +++ b/providers/tests/system/microsoft/azure/example_adls_list.py @@ -42,13 +42,13 @@ ) # [END howto_operator_adls_list] - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/microsoft/azure/example_azure_batch_operator.py b/providers/tests/system/microsoft/azure/example_azure_batch_operator.py index 944c737f96a0d..33d4603c16d43 100644 --- a/providers/tests/system/microsoft/azure/example_azure_batch_operator.py +++ b/providers/tests/system/microsoft/azure/example_azure_batch_operator.py @@ -57,7 +57,7 @@ ) # [END howto_azure_batch_operator] -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/microsoft/azure/example_azure_container_instances.py b/providers/tests/system/microsoft/azure/example_azure_container_instances.py index ee9b025193e36..fe7ccfd48ecc4 100644 --- a/providers/tests/system/microsoft/azure/example_azure_container_instances.py +++ b/providers/tests/system/microsoft/azure/example_azure_container_instances.py @@ -90,7 +90,7 @@ cpu=1.0, task_id="start_container_with_azure_container_volume", ) -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/microsoft/azure/example_azure_cosmosdb.py b/providers/tests/system/microsoft/azure/example_azure_cosmosdb.py index 1d4bb60b05163..7dc9524ef46e1 100644 --- a/providers/tests/system/microsoft/azure/example_azure_cosmosdb.py +++ b/providers/tests/system/microsoft/azure/example_azure_cosmosdb.py @@ -64,13 +64,13 @@ t1 >> t2 - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/microsoft/azure/example_azure_service_bus.py b/providers/tests/system/microsoft/azure/example_azure_service_bus.py index bfa77db40dba0..091fdff3c2cba 100644 --- a/providers/tests/system/microsoft/azure/example_azure_service_bus.py +++ b/providers/tests/system/microsoft/azure/example_azure_service_bus.py @@ -172,13 +172,13 @@ delete_service_bus_queue, ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/microsoft/azure/example_azure_synapse.py b/providers/tests/system/microsoft/azure/example_azure_synapse.py index c7f7800e57834..571cd5b46ff88 100644 --- a/providers/tests/system/microsoft/azure/example_azure_synapse.py +++ b/providers/tests/system/microsoft/azure/example_azure_synapse.py @@ -69,7 +69,7 @@ ) # [END howto_operator_azure_synapse] -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/microsoft/azure/example_fileshare.py b/providers/tests/system/microsoft/azure/example_fileshare.py index bfa9819dbef68..49909ae38fe73 100644 --- a/providers/tests/system/microsoft/azure/example_fileshare.py +++ b/providers/tests/system/microsoft/azure/example_fileshare.py @@ -55,13 +55,13 @@ def delete_fileshare(): ) as dag: create_fileshare() >> delete_fileshare() - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/microsoft/azure/example_local_to_adls.py b/providers/tests/system/microsoft/azure/example_local_to_adls.py index d540aaf34d993..f8eace7577528 100644 --- a/providers/tests/system/microsoft/azure/example_local_to_adls.py +++ b/providers/tests/system/microsoft/azure/example_local_to_adls.py @@ -47,13 +47,13 @@ upload_file >> delete_file - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/microsoft/azure/example_local_to_wasb.py b/providers/tests/system/microsoft/azure/example_local_to_wasb.py index 7e368ca839928..859c33975842f 100644 --- a/providers/tests/system/microsoft/azure/example_local_to_wasb.py +++ b/providers/tests/system/microsoft/azure/example_local_to_wasb.py @@ -49,13 +49,13 @@ upload >> delete - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/microsoft/azure/example_msfabric.py b/providers/tests/system/microsoft/azure/example_msfabric.py index b1113025286d4..0f65df2f72f9e 100644 --- a/providers/tests/system/microsoft/azure/example_msfabric.py +++ b/providers/tests/system/microsoft/azure/example_msfabric.py @@ -51,13 +51,13 @@ ) # [END howto_operator_ms_fabric_create_item_schedule] - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/microsoft/azure/example_msgraph.py b/providers/tests/system/microsoft/azure/example_msgraph.py index 33ee00468523b..239ebb76ab09b 100644 --- a/providers/tests/system/microsoft/azure/example_msgraph.py +++ b/providers/tests/system/microsoft/azure/example_msgraph.py @@ -49,13 +49,13 @@ site_task >> site_pages_task - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/microsoft/azure/example_powerbi.py b/providers/tests/system/microsoft/azure/example_powerbi.py index b5a982a1159a5..a2d9d675476bb 100644 --- a/providers/tests/system/microsoft/azure/example_powerbi.py +++ b/providers/tests/system/microsoft/azure/example_powerbi.py @@ -97,13 +97,13 @@ workspaces_task >> workspaces_info_task >> check_workspace_status_task refresh_dataset_task >> refresh_dataset_history_task - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/microsoft/azure/example_powerbi_dataset_refresh.py b/providers/tests/system/microsoft/azure/example_powerbi_dataset_refresh.py index c02cec3e57f5e..5453caff6463b 100644 --- a/providers/tests/system/microsoft/azure/example_powerbi_dataset_refresh.py +++ b/providers/tests/system/microsoft/azure/example_powerbi_dataset_refresh.py @@ -76,13 +76,13 @@ def create_connection(conn_id_name: str): refresh_powerbi_dataset, ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/microsoft/azure/example_s3_to_wasb.py b/providers/tests/system/microsoft/azure/example_s3_to_wasb.py index 88ae64324d17e..699da911d0846 100644 --- a/providers/tests/system/microsoft/azure/example_s3_to_wasb.py +++ b/providers/tests/system/microsoft/azure/example_s3_to_wasb.py @@ -103,13 +103,13 @@ remove_s3_bucket, ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure when "tearDown" task with trigger # rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/microsoft/azure/example_sftp_to_wasb.py b/providers/tests/system/microsoft/azure/example_sftp_to_wasb.py index 42e5968304f08..0ed953a5853d8 100644 --- a/providers/tests/system/microsoft/azure/example_sftp_to_wasb.py +++ b/providers/tests/system/microsoft/azure/example_sftp_to_wasb.py @@ -75,13 +75,13 @@ def delete_sftp_file(): transfer_files_to_sftp_step >> transfer_files_to_azure >> delete_blob_file_step >> delete_sftp_file() - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/microsoft/azure/example_synapse_run_pipeline.py b/providers/tests/system/microsoft/azure/example_synapse_run_pipeline.py index de87d6b4c2483..589f840e46ab9 100644 --- a/providers/tests/system/microsoft/azure/example_synapse_run_pipeline.py +++ b/providers/tests/system/microsoft/azure/example_synapse_run_pipeline.py @@ -43,13 +43,13 @@ # [END howto_operator_azure_synapse_run_pipeline] begin >> run_pipeline1 - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/microsoft/azure/example_wasb_sensors.py b/providers/tests/system/microsoft/azure/example_wasb_sensors.py index 56c1dce34d688..c4dd7c8fa0b2e 100644 --- a/providers/tests/system/microsoft/azure/example_wasb_sensors.py +++ b/providers/tests/system/microsoft/azure/example_wasb_sensors.py @@ -62,7 +62,7 @@ # [END wasb_prefix_sensor] -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/microsoft/mssql/example_mssql.py b/providers/tests/system/microsoft/mssql/example_mssql.py index 12e2815c59d01..8e29d805ab261 100644 --- a/providers/tests/system/microsoft/mssql/example_mssql.py +++ b/providers/tests/system/microsoft/mssql/example_mssql.py @@ -146,12 +146,12 @@ def insert_mssql_hook(): ) # [END mssql_operator_howto_guide] - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/microsoft/winrm/example_winrm.py b/providers/tests/system/microsoft/winrm/example_winrm.py index 1de1cb8c0fd68..1c7e31ed6752e 100644 --- a/providers/tests/system/microsoft/winrm/example_winrm.py +++ b/providers/tests/system/microsoft/winrm/example_winrm.py @@ -64,13 +64,13 @@ [t1, t2, t3] >> run_this_last - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/mysql/example_mysql.py b/providers/tests/system/mysql/example_mysql.py index 6f0f884197f3a..2f1f37f573a22 100644 --- a/providers/tests/system/mysql/example_mysql.py +++ b/providers/tests/system/mysql/example_mysql.py @@ -59,7 +59,7 @@ drop_table_mysql_task >> mysql_task -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/neo4j/example_neo4j.py b/providers/tests/system/neo4j/example_neo4j.py index 80db3fbb2ab1d..54de74d5f9fbd 100644 --- a/providers/tests/system/neo4j/example_neo4j.py +++ b/providers/tests/system/neo4j/example_neo4j.py @@ -48,7 +48,7 @@ # [END run_query_neo4j_operator] -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/openai/example_openai.py b/providers/tests/system/openai/example_openai.py index d342207b5d09b..3475597abd209 100644 --- a/providers/tests/system/openai/example_openai.py +++ b/providers/tests/system/openai/example_openai.py @@ -104,7 +104,7 @@ def task_to_store_input_text_in_xcom(): example_openai_dag() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/openai/example_trigger_batch_operator.py b/providers/tests/system/openai/example_trigger_batch_operator.py index 3dae1df5d9d0b..4fd3531fab379 100644 --- a/providers/tests/system/openai/example_trigger_batch_operator.py +++ b/providers/tests/system/openai/example_trigger_batch_operator.py @@ -111,7 +111,7 @@ def cleanup_batch_output_file(batch_id, **context): openai_batch_chat_completions() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/opensearch/example_opensearch.py b/providers/tests/system/opensearch/example_opensearch.py index e339fbe788481..904f17a47be7a 100644 --- a/providers/tests/system/opensearch/example_opensearch.py +++ b/providers/tests/system/opensearch/example_opensearch.py @@ -118,14 +118,14 @@ def load_connections(): chain(create_index, add_document_by_class, add_document_by_args, search_high_level, search_low_level) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/opsgenie/example_opsgenie_alert.py b/providers/tests/system/opsgenie/example_opsgenie_alert.py index cf11f824eec8c..be4056b407e6d 100644 --- a/providers/tests/system/opsgenie/example_opsgenie_alert.py +++ b/providers/tests/system/opsgenie/example_opsgenie_alert.py @@ -51,7 +51,7 @@ ) # [END howto_opsgenie_delete_alert_operator] -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/opsgenie/example_opsgenie_notifier.py b/providers/tests/system/opsgenie/example_opsgenie_notifier.py index 97f5945aa9772..79123cf83c537 100644 --- a/providers/tests/system/opsgenie/example_opsgenie_notifier.py +++ b/providers/tests/system/opsgenie/example_opsgenie_notifier.py @@ -37,7 +37,7 @@ ) # [END howto_notifier_opsgenie] -from dev.tests_common.test_utils.system_tests import get_test_run +from tests_common.test_utils.system_tests import get_test_run # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/papermill/example_papermill.py b/providers/tests/system/papermill/example_papermill.py index 529647fe4e719..33b427785cf25 100644 --- a/providers/tests/system/papermill/example_papermill.py +++ b/providers/tests/system/papermill/example_papermill.py @@ -52,7 +52,7 @@ ) # [END howto_operator_papermill] -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/papermill/example_papermill_remote_verify.py b/providers/tests/system/papermill/example_papermill_remote_verify.py index f325928b8cd01..89d482858cb06 100644 --- a/providers/tests/system/papermill/example_papermill_remote_verify.py +++ b/providers/tests/system/papermill/example_papermill_remote_verify.py @@ -75,7 +75,7 @@ def check_notebook(output_notebook, execution_date): ) # [END howto_verify_operator_papermill_remote_kernel] -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/papermill/example_papermill_verify.py b/providers/tests/system/papermill/example_papermill_verify.py index cfae2cc6ed3e0..632b209f21ef6 100644 --- a/providers/tests/system/papermill/example_papermill_verify.py +++ b/providers/tests/system/papermill/example_papermill_verify.py @@ -73,7 +73,7 @@ def check_notebook(inlets, execution_date): run_this >> check_notebook(inlets=AUTO, execution_date="{{ execution_date }}") # [END howto_verify_operator_papermill] -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/pgvector/example_pgvector.py b/providers/tests/system/pgvector/example_pgvector.py index 5c16b9da307cb..27402ae38f11b 100644 --- a/providers/tests/system/pgvector/example_pgvector.py +++ b/providers/tests/system/pgvector/example_pgvector.py @@ -76,7 +76,7 @@ def cleanup_postgres_objects(): example_pgvector_dag() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/pgvector/example_pgvector_openai.py b/providers/tests/system/pgvector/example_pgvector_openai.py index 9c8f841e8f933..9d0a3165c22dd 100644 --- a/providers/tests/system/pgvector/example_pgvector_openai.py +++ b/providers/tests/system/pgvector/example_pgvector_openai.py @@ -90,7 +90,7 @@ def cleanup_postgres_objects(): example_pgvector_dag() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/pinecone/example_create_pod_index.py b/providers/tests/system/pinecone/example_create_pod_index.py index e0342e2d62008..9a93b1241f884 100644 --- a/providers/tests/system/pinecone/example_create_pod_index.py +++ b/providers/tests/system/pinecone/example_create_pod_index.py @@ -56,7 +56,7 @@ def delete_index(): create_index >> delete_index() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/pinecone/example_create_serverless_index.py b/providers/tests/system/pinecone/example_create_serverless_index.py index 28078b1b608cd..e276c345c4a03 100644 --- a/providers/tests/system/pinecone/example_create_serverless_index.py +++ b/providers/tests/system/pinecone/example_create_serverless_index.py @@ -55,7 +55,7 @@ def delete_index(): create_index >> delete_index() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/pinecone/example_dag_pinecone.py b/providers/tests/system/pinecone/example_dag_pinecone.py index 744f6518dceae..fd23f79bf7291 100644 --- a/providers/tests/system/pinecone/example_dag_pinecone.py +++ b/providers/tests/system/pinecone/example_dag_pinecone.py @@ -46,7 +46,7 @@ # [END howto_operator_pinecone_ingest] -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/pinecone/example_pinecone_cohere.py b/providers/tests/system/pinecone/example_pinecone_cohere.py index 80e9b1efad8eb..8813479d61a70 100644 --- a/providers/tests/system/pinecone/example_pinecone_cohere.py +++ b/providers/tests/system/pinecone/example_pinecone_cohere.py @@ -76,7 +76,7 @@ def delete_index(): create_index() >> embed_task >> transformed_output >> perform_ingestion >> delete_index() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/pinecone/example_pinecone_openai.py b/providers/tests/system/pinecone/example_pinecone_openai.py index dad83f48085a5..b75a155192578 100644 --- a/providers/tests/system/pinecone/example_pinecone_openai.py +++ b/providers/tests/system/pinecone/example_pinecone_openai.py @@ -107,7 +107,7 @@ def delete_index(): create_index >> embed_task >> perform_ingestion >> delete_index() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/postgres/example_postgres.py b/providers/tests/system/postgres/example_postgres.py index 5ffaf6ea0098a..70ad784ecdf19 100644 --- a/providers/tests/system/postgres/example_postgres.py +++ b/providers/tests/system/postgres/example_postgres.py @@ -80,13 +80,13 @@ create_pet_table >> populate_pet_table >> get_all_pets >> get_birth_date # [END postgres_sql_execute_query_operator_howto_guide] - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/presto/example_gcs_to_presto.py b/providers/tests/system/presto/example_gcs_to_presto.py index ceccf098471dc..6c8baaf691346 100644 --- a/providers/tests/system/presto/example_gcs_to_presto.py +++ b/providers/tests/system/presto/example_gcs_to_presto.py @@ -50,7 +50,7 @@ # [END gcs_csv_to_presto_table] -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/qdrant/example_dag_qdrant.py b/providers/tests/system/qdrant/example_dag_qdrant.py index 85c92d9c99312..a6dc94d443586 100644 --- a/providers/tests/system/qdrant/example_dag_qdrant.py +++ b/providers/tests/system/qdrant/example_dag_qdrant.py @@ -43,7 +43,7 @@ # [END howto_operator_qdrant_ingest] -from dev.tests_common.test_utils.system_tests import get_test_run +from tests_common.test_utils.system_tests import get_test_run # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/redis/example_redis_publish.py b/providers/tests/system/redis/example_redis_publish.py index 335256f68e57d..671041e7d9808 100644 --- a/providers/tests/system/redis/example_redis_publish.py +++ b/providers/tests/system/redis/example_redis_publish.py @@ -73,13 +73,13 @@ publish_task >> key_sensor_task - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/salesforce/example_bulk.py b/providers/tests/system/salesforce/example_bulk.py index 7d43de648805d..71887e57f2156 100644 --- a/providers/tests/system/salesforce/example_bulk.py +++ b/providers/tests/system/salesforce/example_bulk.py @@ -90,7 +90,7 @@ # [END howto_salesforce_bulk_delete_operation] -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/salesforce/example_salesforce_apex_rest.py b/providers/tests/system/salesforce/example_salesforce_apex_rest.py index 2961ffa4e4784..3d724289b338e 100644 --- a/providers/tests/system/salesforce/example_salesforce_apex_rest.py +++ b/providers/tests/system/salesforce/example_salesforce_apex_rest.py @@ -41,7 +41,7 @@ # [END howto_salesforce_apex_rest_operator] -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/samba/example_gcs_to_samba.py b/providers/tests/system/samba/example_gcs_to_samba.py index d7717fcbfc727..895ddcf624e7e 100644 --- a/providers/tests/system/samba/example_gcs_to_samba.py +++ b/providers/tests/system/samba/example_gcs_to_samba.py @@ -138,14 +138,14 @@ >> delete_bucket ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/sftp/example_sftp_sensor.py b/providers/tests/system/sftp/example_sftp_sensor.py index a3bde8a03af0a..cd23e18d7d56a 100644 --- a/providers/tests/system/sftp/example_sftp_sensor.py +++ b/providers/tests/system/sftp/example_sftp_sensor.py @@ -89,14 +89,14 @@ def sftp_sensor_decorator(): >> remove_file_task_end ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/singularity/example_singularity.py b/providers/tests/system/singularity/example_singularity.py index e80a0f40eb955..7f311f39c5faa 100644 --- a/providers/tests/system/singularity/example_singularity.py +++ b/providers/tests/system/singularity/example_singularity.py @@ -50,7 +50,7 @@ t3 >> t4 -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/slack/example_slack.py b/providers/tests/system/slack/example_slack.py index f122dffca2782..1b0be71efdc9f 100644 --- a/providers/tests/system/slack/example_slack.py +++ b/providers/tests/system/slack/example_slack.py @@ -94,7 +94,7 @@ ) -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/slack/example_slack_webhook.py b/providers/tests/system/slack/example_slack_webhook.py index 7e45dc92d921f..6a59f6e4de70d 100644 --- a/providers/tests/system/slack/example_slack_webhook.py +++ b/providers/tests/system/slack/example_slack_webhook.py @@ -69,7 +69,7 @@ slack_webhook_operator_text >> slack_webhook_operator_blocks -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/slack/example_sql_to_slack.py b/providers/tests/system/slack/example_sql_to_slack.py index 457bcecaea671..bd42e3b47d4c5 100644 --- a/providers/tests/system/slack/example_sql_to_slack.py +++ b/providers/tests/system/slack/example_sql_to_slack.py @@ -52,7 +52,7 @@ # [END howto_operator_sql_to_slack_api_file] -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/slack/example_sql_to_slack_webhook.py b/providers/tests/system/slack/example_sql_to_slack_webhook.py index 44fad156657be..75da7353daa2d 100644 --- a/providers/tests/system/slack/example_sql_to_slack_webhook.py +++ b/providers/tests/system/slack/example_sql_to_slack_webhook.py @@ -51,7 +51,7 @@ # [END howto_operator_sql_to_slack_webhook] -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/snowflake/example_copy_into_snowflake.py b/providers/tests/system/snowflake/example_copy_into_snowflake.py index 32eb9699d74b6..a2f9b9277e308 100644 --- a/providers/tests/system/snowflake/example_copy_into_snowflake.py +++ b/providers/tests/system/snowflake/example_copy_into_snowflake.py @@ -60,7 +60,7 @@ # [END howto_operator_s3_copy_into_snowflake] -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/snowflake/example_snowflake.py b/providers/tests/system/snowflake/example_snowflake.py index e851b13c08200..f2bf8d00679de 100644 --- a/providers/tests/system/snowflake/example_snowflake.py +++ b/providers/tests/system/snowflake/example_snowflake.py @@ -96,7 +96,7 @@ ) -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/snowflake/example_snowpark_decorator.py b/providers/tests/system/snowflake/example_snowpark_decorator.py index 4c2319a91b21e..59cf1f1fedbb6 100644 --- a/providers/tests/system/snowflake/example_snowpark_decorator.py +++ b/providers/tests/system/snowflake/example_snowpark_decorator.py @@ -80,7 +80,7 @@ def check_num_rows(table_name: str): # [END howto_decorator_snowpark] -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/snowflake/example_snowpark_operator.py b/providers/tests/system/snowflake/example_snowpark_operator.py index 1d7cce34f7aa1..c9ede310074c5 100644 --- a/providers/tests/system/snowflake/example_snowpark_operator.py +++ b/providers/tests/system/snowflake/example_snowpark_operator.py @@ -89,7 +89,7 @@ def check_num_rows(table_name: str): # [END howto_operator_snowpark] -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/sqlite/example_sqlite.py b/providers/tests/system/sqlite/example_sqlite.py index 1ea0270a0df27..e3eec31c1bfd6 100644 --- a/providers/tests/system/sqlite/example_sqlite.py +++ b/providers/tests/system/sqlite/example_sqlite.py @@ -91,13 +91,13 @@ def replace_sqlite_hook(): >> replace_sqlite_hook() ) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/tableau/example_tableau.py b/providers/tests/system/tableau/example_tableau.py index 1472511a66c95..41b99b0ece89e 100644 --- a/providers/tests/system/tableau/example_tableau.py +++ b/providers/tests/system/tableau/example_tableau.py @@ -71,7 +71,7 @@ # task_refresh_workbook_non_blocking >> task_check_job_status -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/telegram/example_telegram.py b/providers/tests/system/telegram/example_telegram.py index a7e9018cf85f1..23341f991447d 100644 --- a/providers/tests/system/telegram/example_telegram.py +++ b/providers/tests/system/telegram/example_telegram.py @@ -45,7 +45,7 @@ # [END howto_operator_telegram] -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/teradata/example_azure_blob_to_teradata_transfer.py b/providers/tests/system/teradata/example_azure_blob_to_teradata_transfer.py index 26fd27554d5d1..dec92a90366bb 100644 --- a/providers/tests/system/teradata/example_azure_blob_to_teradata_transfer.py +++ b/providers/tests/system/teradata/example_azure_blob_to_teradata_transfer.py @@ -205,13 +205,13 @@ ) # [END azure_blob_to_teradata_transfer_operator_howto_guide] - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/teradata/example_s3_to_teradata_transfer.py b/providers/tests/system/teradata/example_s3_to_teradata_transfer.py index ab361990b21e4..d7ba2a3b415f8 100644 --- a/providers/tests/system/teradata/example_s3_to_teradata_transfer.py +++ b/providers/tests/system/teradata/example_s3_to_teradata_transfer.py @@ -206,13 +206,13 @@ ) # [END s3_to_teradata_transfer_operator_howto_guide] - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/teradata/example_ssl_teradata.py b/providers/tests/system/teradata/example_ssl_teradata.py index 3836715a8e634..8ec5898f7437c 100644 --- a/providers/tests/system/teradata/example_ssl_teradata.py +++ b/providers/tests/system/teradata/example_ssl_teradata.py @@ -121,13 +121,13 @@ # [END teradata_operator_howto_guide] - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/teradata/example_teradata.py b/providers/tests/system/teradata/example_teradata.py index ae41effce7fec..a12fb3abb7e6c 100644 --- a/providers/tests/system/teradata/example_teradata.py +++ b/providers/tests/system/teradata/example_teradata.py @@ -164,13 +164,13 @@ # [END teradata_operator_howto_guide] - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/teradata/example_teradata_call_sp.py b/providers/tests/system/teradata/example_teradata_call_sp.py index f48583d83ec55..d41121324bcf3 100644 --- a/providers/tests/system/teradata/example_teradata_call_sp.py +++ b/providers/tests/system/teradata/example_teradata_call_sp.py @@ -162,13 +162,13 @@ # [END howto_teradata_operator_for_sp] - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/teradata/example_teradata_compute_cluster.py b/providers/tests/system/teradata/example_teradata_compute_cluster.py index 210cde7816bc2..6ffb4fd99ec67 100644 --- a/providers/tests/system/teradata/example_teradata_compute_cluster.py +++ b/providers/tests/system/teradata/example_teradata_compute_cluster.py @@ -146,13 +146,13 @@ # [END teradata_vantage_lake_compute_cluster_howto_guide] - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/teradata/example_teradata_to_teradata_transfer.py b/providers/tests/system/teradata/example_teradata_to_teradata_transfer.py index 7f315202606fc..a96d42816a271 100644 --- a/providers/tests/system/teradata/example_teradata_to_teradata_transfer.py +++ b/providers/tests/system/teradata/example_teradata_to_teradata_transfer.py @@ -148,13 +148,13 @@ ) # [END teradata_to_teradata_transfer_operator_howto_guide] - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/trino/example_gcs_to_trino.py b/providers/tests/system/trino/example_gcs_to_trino.py index e0249101eb1a4..4c559301e64da 100644 --- a/providers/tests/system/trino/example_gcs_to_trino.py +++ b/providers/tests/system/trino/example_gcs_to_trino.py @@ -50,7 +50,7 @@ # [END gcs_csv_to_trino_table] -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/trino/example_trino.py b/providers/tests/system/trino/example_trino.py index d708d9b7b8fb7..db9fef4128b93 100644 --- a/providers/tests/system/trino/example_trino.py +++ b/providers/tests/system/trino/example_trino.py @@ -91,7 +91,7 @@ # [END howto_operator_trino] -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/weaviate/example_weaviate_cohere.py b/providers/tests/system/weaviate/example_weaviate_cohere.py index 1db5e2cccb72a..11b45c2cb45be 100644 --- a/providers/tests/system/weaviate/example_weaviate_cohere.py +++ b/providers/tests/system/weaviate/example_weaviate_cohere.py @@ -115,7 +115,7 @@ def delete_weaviate_collections(): example_weaviate_cohere() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/weaviate/example_weaviate_dynamic_mapping_dag.py b/providers/tests/system/weaviate/example_weaviate_dynamic_mapping_dag.py index 38c0168a9f615..b3dfb52a60fb9 100644 --- a/providers/tests/system/weaviate/example_weaviate_dynamic_mapping_dag.py +++ b/providers/tests/system/weaviate/example_weaviate_dynamic_mapping_dag.py @@ -92,7 +92,7 @@ def delete_weaviate_collection(collection_name): example_weaviate_dynamic_mapping_dag() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/weaviate/example_weaviate_openai.py b/providers/tests/system/weaviate/example_weaviate_openai.py index edad9058f8738..76713826035a1 100644 --- a/providers/tests/system/weaviate/example_weaviate_openai.py +++ b/providers/tests/system/weaviate/example_weaviate_openai.py @@ -123,7 +123,7 @@ def delete_weaviate_collection(): example_weaviate_openai() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/weaviate/example_weaviate_operator.py b/providers/tests/system/weaviate/example_weaviate_operator.py index 309864ad64924..734a7e5fa3945 100644 --- a/providers/tests/system/weaviate/example_weaviate_operator.py +++ b/providers/tests/system/weaviate/example_weaviate_operator.py @@ -297,7 +297,7 @@ def delete_weaviate_docs_collection_without_vector(): example_weaviate_using_operator() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/weaviate/example_weaviate_using_hook.py b/providers/tests/system/weaviate/example_weaviate_using_hook.py index 601a222f94d4e..8df913e0044fd 100644 --- a/providers/tests/system/weaviate/example_weaviate_using_hook.py +++ b/providers/tests/system/weaviate/example_weaviate_using_hook.py @@ -140,7 +140,7 @@ def delete_weaviate_collection_without_vector(): example_weaviate_dag_using_hook() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/weaviate/example_weaviate_vectorizer_dag.py b/providers/tests/system/weaviate/example_weaviate_vectorizer_dag.py index f0306177bffd4..17b7e25edb3cb 100644 --- a/providers/tests/system/weaviate/example_weaviate_vectorizer_dag.py +++ b/providers/tests/system/weaviate/example_weaviate_vectorizer_dag.py @@ -99,7 +99,7 @@ def delete_weaviate_collection(): example_weaviate_vectorizer_dag() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/weaviate/example_weaviate_without_vectorizer_dag.py b/providers/tests/system/weaviate/example_weaviate_without_vectorizer_dag.py index e2cf9e560e785..efb8d89730f6e 100644 --- a/providers/tests/system/weaviate/example_weaviate_without_vectorizer_dag.py +++ b/providers/tests/system/weaviate/example_weaviate_without_vectorizer_dag.py @@ -111,7 +111,7 @@ def delete_weaviate_collection(): example_weaviate_without_vectorizer_dag() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/yandex/example_yandexcloud.py b/providers/tests/system/yandex/example_yandexcloud.py index ab72adc14c051..85284af2642ef 100644 --- a/providers/tests/system/yandex/example_yandexcloud.py +++ b/providers/tests/system/yandex/example_yandexcloud.py @@ -27,14 +27,13 @@ import yandex.cloud.dataproc.v1.job_service_pb2_grpc as job_service_grpc_pb import yandex.cloud.dataproc.v1.subcluster_pb2 as subcluster_pb from google.protobuf.json_format import MessageToDict +from tests_common.test_utils.system_tests import get_test_env_id from yandexcloud.operations import OperationError from airflow import DAG from airflow.decorators import task from airflow.providers.yandex.hooks.yandex import YandexCloudBaseHook -from dev.tests_common.test_utils.system_tests import get_test_env_id - ENV_ID = get_test_env_id() DAG_ID = "example_yandexcloud_hook" @@ -197,14 +196,14 @@ def delete_cluster( spark_job >> delete_task - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "teardown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/yandex/example_yandexcloud_dataproc.py b/providers/tests/system/yandex/example_yandexcloud_dataproc.py index d97e3d592ef88..13cabfc0c48a8 100644 --- a/providers/tests/system/yandex/example_yandexcloud_dataproc.py +++ b/providers/tests/system/yandex/example_yandexcloud_dataproc.py @@ -19,6 +19,8 @@ import uuid from datetime import datetime +from tests_common.test_utils.system_tests import get_test_env_id + from airflow import DAG from airflow.providers.yandex.operators.dataproc import ( DataprocCreateClusterOperator, @@ -32,8 +34,6 @@ # Name of the datacenter where Dataproc cluster will be created from airflow.utils.trigger_rule import TriggerRule -from dev.tests_common.test_utils.system_tests import get_test_env_id - # should be filled with appropriate ids @@ -163,13 +163,13 @@ create_cluster >> create_mapreduce_job >> create_hive_query >> create_hive_query_from_file create_hive_query_from_file >> create_spark_job >> create_pyspark_job >> delete_cluster - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "teardown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/yandex/example_yandexcloud_dataproc_lightweight.py b/providers/tests/system/yandex/example_yandexcloud_dataproc_lightweight.py index 38401a1cdcd39..fe77142f3d069 100644 --- a/providers/tests/system/yandex/example_yandexcloud_dataproc_lightweight.py +++ b/providers/tests/system/yandex/example_yandexcloud_dataproc_lightweight.py @@ -18,6 +18,8 @@ from datetime import datetime +from tests_common.test_utils.system_tests import get_test_env_id + from airflow import DAG from airflow.providers.yandex.operators.dataproc import ( DataprocCreateClusterOperator, @@ -28,8 +30,6 @@ # Name of the datacenter where Dataproc cluster will be created from airflow.utils.trigger_rule import TriggerRule -from dev.tests_common.test_utils.system_tests import get_test_env_id - # should be filled with appropriate ids @@ -71,13 +71,13 @@ ) create_spark_job >> delete_cluster - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "teardown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/yandex/example_yandexcloud_yq.py b/providers/tests/system/yandex/example_yandexcloud_yq.py index 02478825ed5e0..a83e8bd789f97 100644 --- a/providers/tests/system/yandex/example_yandexcloud_yq.py +++ b/providers/tests/system/yandex/example_yandexcloud_yq.py @@ -18,12 +18,12 @@ from datetime import datetime +from tests_common.test_utils.system_tests import get_test_env_id + from airflow.models.dag import DAG from airflow.operators.empty import EmptyOperator from airflow.providers.yandex.operators.yq import YQExecuteQueryOperator -from dev.tests_common.test_utils.system_tests import get_test_env_id - ENV_ID = get_test_env_id() DAG_ID = "example_yandexcloud_yq" @@ -40,13 +40,13 @@ yq_operator = YQExecuteQueryOperator(task_id="sample_query", sql="select 33 as d, 44 as t") yq_operator >> run_this_last - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "teardown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/ydb/example_ydb.py b/providers/tests/system/ydb/example_ydb.py index d7293cb0d1b56..2f3f88cabe64b 100644 --- a/providers/tests/system/ydb/example_ydb.py +++ b/providers/tests/system/ydb/example_ydb.py @@ -119,13 +119,13 @@ def populate_pet_table_via_bulk_upsert(): ) # [END ydb_operator_howto_guide] - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/system/zendesk/example_zendesk_custom_get.py b/providers/tests/system/zendesk/example_zendesk_custom_get.py index c38d10a26abd3..a94f4e3ef6b5b 100644 --- a/providers/tests/system/zendesk/example_zendesk_custom_get.py +++ b/providers/tests/system/zendesk/example_zendesk_custom_get.py @@ -45,7 +45,7 @@ def fetch_organizations() -> list[dict]: fetch_organizations() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/providers/tests/yandex/hooks/test_yandex.py b/providers/tests/yandex/hooks/test_yandex.py index fbf77115053b2..eacb2708e944a 100644 --- a/providers/tests/yandex/hooks/test_yandex.py +++ b/providers/tests/yandex/hooks/test_yandex.py @@ -25,11 +25,11 @@ yandexcloud = pytest.importorskip("yandexcloud") +from tests_common.test_utils.config import conf_vars + from airflow.exceptions import AirflowProviderDeprecationWarning from airflow.providers.yandex.hooks.yandex import YandexCloudBaseHook -from dev.tests_common.test_utils.config import conf_vars - class TestYandexHook: @mock.patch("airflow.hooks.base.BaseHook.get_connection") diff --git a/providers/tests/yandex/links/test_yq.py b/providers/tests/yandex/links/test_yq.py index 2ed720e7e141c..dfd255d41c0eb 100644 --- a/providers/tests/yandex/links/test_yq.py +++ b/providers/tests/yandex/links/test_yq.py @@ -19,14 +19,13 @@ from unittest import mock import pytest +from tests_common.test_utils.compat import AIRFLOW_V_3_0_PLUS +from tests_common.test_utils.mock_operators import MockOperator from airflow.models.taskinstance import TaskInstance from airflow.models.xcom import XCom from airflow.providers.yandex.links.yq import YQLink -from dev.tests_common.test_utils.compat import AIRFLOW_V_3_0_PLUS -from dev.tests_common.test_utils.mock_operators import MockOperator - yandexcloud = pytest.importorskip("yandexcloud") diff --git a/providers/tests/yandex/operators/test_yq.py b/providers/tests/yandex/operators/test_yq.py index 7e586e929eaff..8c5204497230d 100644 --- a/providers/tests/yandex/operators/test_yq.py +++ b/providers/tests/yandex/operators/test_yq.py @@ -21,8 +21,7 @@ from unittest.mock import MagicMock, call, patch import pytest - -from dev.tests_common.test_utils.compat import AIRFLOW_V_3_0_PLUS +from tests_common.test_utils.compat import AIRFLOW_V_3_0_PLUS yandexcloud = pytest.importorskip("yandexcloud") diff --git a/pyproject.toml b/pyproject.toml index 160e8e2ce0b0c..a5dadf0e96651 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -342,7 +342,7 @@ section-order = [ # Make sure we put the "dev" imports at the end, not as a third-party module [tool.ruff.lint.isort.sections] -testing = ["dev", "providers.tests", "task_sdk.tests"] +testing = ["dev", "providers.tests", "task_sdk.tests", "test_common", "tests"] [tool.ruff.lint.extend-per-file-ignores] "airflow/__init__.py" = ["F401", "TCH004"] @@ -377,7 +377,7 @@ testing = ["dev", "providers.tests", "task_sdk.tests"] # TRY002: Use `raise Exception` "dev/perf/*" = ["TID253"] "dev/check_files.py" = ["S101"] -"dev/tests_common/*" = ["S101", "TRY002"] +"tests_common/*" = ["S101", "TRY002"] "dev/breeze/tests/*" = ["TID253", "S101", "TRY002"] "tests/*" = ["D", "TID253", "S101", "TRY002"] "docker_tests/*" = ["D", "TID253", "S101", "TRY002"] @@ -395,7 +395,7 @@ testing = ["dev", "providers.tests", "task_sdk.tests"] "helm_tests/airflow_aux/test_basic_helm_chart.py" = ["B028"] # Test compat imports banned imports to allow testing against older airflow versions -"dev/tests_common/test_utils/compat.py" = ["TID251", "F401"] +"tests_common/test_utils/compat.py" = ["TID251", "F401"] [tool.ruff.lint.flake8-tidy-imports] # Disallow all relative imports. diff --git a/scripts/ci/docker-compose/local.yml b/scripts/ci/docker-compose/local.yml index f0bce46894164..1b68dc84aa08f 100644 --- a/scripts/ci/docker-compose/local.yml +++ b/scripts/ci/docker-compose/local.yml @@ -100,6 +100,9 @@ services: - type: bind source: ../../../scripts/docker/entrypoint_ci.sh target: /entrypoint + - type: bind + source: ../../../tests_common + target: /opt/airflow/tests_common - type: bind source: ../../../tests target: /opt/airflow/tests diff --git a/scripts/ci/pre_commit/check_system_tests.py b/scripts/ci/pre_commit/check_system_tests.py index c7c305460cb3e..1eceafaab1da4 100755 --- a/scripts/ci/pre_commit/check_system_tests.py +++ b/scripts/ci/pre_commit/check_system_tests.py @@ -37,13 +37,13 @@ WATCHER_APPEND_INSTRUCTION = "list(dag.tasks) >> watcher()" PYTEST_FUNCTION = """ -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) """ PYTEST_FUNCTION_PATTERN = re.compile( - r"from dev\.tests_common\.test_utils\.system_tests import get_test_run(?: # noqa: E402)?\s+" + r"from tests_common\.test_utils\.system_tests import get_test_run(?: # noqa: E402)?\s+" r"(?:# .+\))?\s+" r"test_run = get_test_run\(dag\)" ) @@ -51,11 +51,11 @@ def _check_file(file: Path): content = file.read_text() - if "from dev.tests_common.test_utils.watcher import watcher" in content: + if "from tests_common.test_utils.watcher import watcher" in content: index = content.find(WATCHER_APPEND_INSTRUCTION) if index == -1: errors.append( - f"[red]The example {file} imports dev.tests_common.test_utils.watcher " + f"[red]The example {file} imports tests_common.test_utils.watcher " f"but does not use it properly![/]\n\n" "[yellow]Make sure you have:[/]\n\n" f" {WATCHER_APPEND_INSTRUCTION}\n\n" diff --git a/scripts/in_container/install_devel_deps.py b/scripts/in_container/install_devel_deps.py index 84f28bb2cc48b..971e11725dd8d 100755 --- a/scripts/in_container/install_devel_deps.py +++ b/scripts/in_container/install_devel_deps.py @@ -28,7 +28,7 @@ def get_devel_test_deps() -> list[str]: # Pre-install the tests_common pytest plugin/utils, in case sources aren't mounted - devel_deps: list[str] = ["./dev/tests_common"] + devel_deps: list[str] = ["./tests_common"] hatch_build_content = (AIRFLOW_SOURCES_DIR / "hatch_build.py").read_text().splitlines() store = False for line in hatch_build_content: diff --git a/task_sdk/tests/conftest.py b/task_sdk/tests/conftest.py index 7839b299eef2c..a410a1217c2f0 100644 --- a/task_sdk/tests/conftest.py +++ b/task_sdk/tests/conftest.py @@ -18,7 +18,7 @@ import pytest -pytest_plugins = "dev.tests_common.pytest_plugin" +pytest_plugins = "tests_common.pytest_plugin" @pytest.hookimpl(tryfirst=True) diff --git a/tests/always/test_connection.py b/tests/always/test_connection.py index 0f6b27c62d4ef..e289c7d2172ed 100644 --- a/tests/always/test_connection.py +++ b/tests/always/test_connection.py @@ -33,8 +33,7 @@ from airflow.models import Connection, crypto from airflow.providers.sqlite.hooks.sqlite import SqliteHook from airflow.providers_manager import HookInfo - -from dev.tests_common.test_utils.config import conf_vars +from tests_common.test_utils.config import conf_vars ConnectionParts = namedtuple("ConnectionParts", ["conn_type", "login", "password", "host", "port", "schema"]) diff --git a/tests/always/test_example_dags.py b/tests/always/test_example_dags.py index 9def5f42206f8..edfc9b46f916e 100644 --- a/tests/always/test_example_dags.py +++ b/tests/always/test_example_dags.py @@ -29,8 +29,7 @@ from airflow.models import DagBag from airflow.utils import yaml - -from dev.tests_common.test_utils.asserts import assert_queries_count +from tests_common.test_utils.asserts import assert_queries_count AIRFLOW_SOURCES_ROOT = Path(__file__).resolve().parents[2] AIRFLOW_PROVIDERS_ROOT = AIRFLOW_SOURCES_ROOT / "airflow" / "providers" diff --git a/tests/always/test_secrets.py b/tests/always/test_secrets.py index a8b2296de1ccd..1e47fc13ce7c9 100644 --- a/tests/always/test_secrets.py +++ b/tests/always/test_secrets.py @@ -24,9 +24,8 @@ from airflow.configuration import ensure_secrets_loaded, initialize_secrets_backends from airflow.models import Connection, Variable from airflow.secrets.cache import SecretCache - -from dev.tests_common.test_utils.config import conf_vars -from dev.tests_common.test_utils.db import clear_db_variables +from tests_common.test_utils.config import conf_vars +from tests_common.test_utils.db import clear_db_variables class TestConnectionsFromSecrets: diff --git a/tests/always/test_secrets_backends.py b/tests/always/test_secrets_backends.py index c5093d2e562a7..a74c7ac4e95f0 100644 --- a/tests/always/test_secrets_backends.py +++ b/tests/always/test_secrets_backends.py @@ -28,8 +28,7 @@ from airflow.secrets.environment_variables import EnvironmentVariablesBackend from airflow.secrets.metastore import MetastoreBackend from airflow.utils.session import create_session - -from dev.tests_common.test_utils.db import clear_db_connections, clear_db_variables +from tests_common.test_utils.db import clear_db_connections, clear_db_variables pytestmark = pytest.mark.db_test diff --git a/tests/always/test_secrets_local_filesystem.py b/tests/always/test_secrets_local_filesystem.py index 40472ec64d5f5..0a84120d2d087 100644 --- a/tests/always/test_secrets_local_filesystem.py +++ b/tests/always/test_secrets_local_filesystem.py @@ -29,8 +29,7 @@ from airflow.models import Variable from airflow.secrets import local_filesystem from airflow.secrets.local_filesystem import LocalFilesystemBackend - -from dev.tests_common.test_utils.config import conf_vars +from tests_common.test_utils.config import conf_vars @contextmanager diff --git a/tests/api_connexion/conftest.py b/tests/api_connexion/conftest.py index 8ab76fbb76298..0d91a8dc34a76 100644 --- a/tests/api_connexion/conftest.py +++ b/tests/api_connexion/conftest.py @@ -19,9 +19,8 @@ import pytest from airflow.www import app - -from dev.tests_common.test_utils.config import conf_vars -from dev.tests_common.test_utils.decorators import dont_initialize_flask_app_submodules +from tests_common.test_utils.config import conf_vars +from tests_common.test_utils.decorators import dont_initialize_flask_app_submodules @pytest.fixture(scope="session") @@ -39,7 +38,7 @@ def minimal_app_for_api(): def factory(): with conf_vars( { - ("api", "auth_backends"): "dev.tests_common.test_utils.remote_user_api_auth_backend", + ("api", "auth_backends"): "tests_common.test_utils.remote_user_api_auth_backend", ( "core", "auth_manager", diff --git a/tests/api_connexion/endpoints/test_asset_endpoint.py b/tests/api_connexion/endpoints/test_asset_endpoint.py index 39b0129c3317d..e02844561f8c4 100644 --- a/tests/api_connexion/endpoints/test_asset_endpoint.py +++ b/tests/api_connexion/endpoints/test_asset_endpoint.py @@ -36,12 +36,11 @@ from airflow.utils import timezone from airflow.utils.session import provide_session from airflow.utils.types import DagRunType - -from dev.tests_common.test_utils.api_connexion_utils import assert_401, create_user, delete_user -from dev.tests_common.test_utils.asserts import assert_queries_count -from dev.tests_common.test_utils.config import conf_vars -from dev.tests_common.test_utils.db import clear_db_assets, clear_db_runs -from dev.tests_common.test_utils.www import _check_last_log +from tests_common.test_utils.api_connexion_utils import assert_401, create_user, delete_user +from tests_common.test_utils.asserts import assert_queries_count +from tests_common.test_utils.config import conf_vars +from tests_common.test_utils.db import clear_db_assets, clear_db_runs +from tests_common.test_utils.www import _check_last_log pytestmark = [pytest.mark.db_test, pytest.mark.skip_if_database_isolation_mode] diff --git a/tests/api_connexion/endpoints/test_backfill_endpoint.py b/tests/api_connexion/endpoints/test_backfill_endpoint.py index 5bb959cabaf56..bc5a214654368 100644 --- a/tests/api_connexion/endpoints/test_backfill_endpoint.py +++ b/tests/api_connexion/endpoints/test_backfill_endpoint.py @@ -29,9 +29,8 @@ from airflow.operators.empty import EmptyOperator from airflow.utils import timezone from airflow.utils.session import provide_session - -from dev.tests_common.test_utils.api_connexion_utils import create_user, delete_user -from dev.tests_common.test_utils.db import ( +from tests_common.test_utils.api_connexion_utils import create_user, delete_user +from tests_common.test_utils.db import ( clear_db_backfills, clear_db_dags, clear_db_runs, diff --git a/tests/api_connexion/endpoints/test_config_endpoint.py b/tests/api_connexion/endpoints/test_config_endpoint.py index c46a6571c23b9..86046ec3f37c3 100644 --- a/tests/api_connexion/endpoints/test_config_endpoint.py +++ b/tests/api_connexion/endpoints/test_config_endpoint.py @@ -21,8 +21,8 @@ import pytest -from dev.tests_common.test_utils.api_connexion_utils import assert_401, create_user, delete_user -from dev.tests_common.test_utils.config import conf_vars +from tests_common.test_utils.api_connexion_utils import assert_401, create_user, delete_user +from tests_common.test_utils.config import conf_vars pytestmark = [pytest.mark.db_test, pytest.mark.skip_if_database_isolation_mode] diff --git a/tests/api_connexion/endpoints/test_connection_endpoint.py b/tests/api_connexion/endpoints/test_connection_endpoint.py index fb2d53074cd87..b82fac609bd9e 100644 --- a/tests/api_connexion/endpoints/test_connection_endpoint.py +++ b/tests/api_connexion/endpoints/test_connection_endpoint.py @@ -25,11 +25,10 @@ from airflow.models import Connection from airflow.secrets.environment_variables import CONN_ENV_PREFIX from airflow.utils.session import provide_session - -from dev.tests_common.test_utils.api_connexion_utils import assert_401, create_user, delete_user -from dev.tests_common.test_utils.config import conf_vars -from dev.tests_common.test_utils.db import clear_db_connections -from dev.tests_common.test_utils.www import _check_last_log +from tests_common.test_utils.api_connexion_utils import assert_401, create_user, delete_user +from tests_common.test_utils.config import conf_vars +from tests_common.test_utils.db import clear_db_connections +from tests_common.test_utils.www import _check_last_log pytestmark = [pytest.mark.db_test, pytest.mark.skip_if_database_isolation_mode] diff --git a/tests/api_connexion/endpoints/test_dag_endpoint.py b/tests/api_connexion/endpoints/test_dag_endpoint.py index 86e0a3b4b3ec6..fd3b8b7d90d17 100644 --- a/tests/api_connexion/endpoints/test_dag_endpoint.py +++ b/tests/api_connexion/endpoints/test_dag_endpoint.py @@ -30,11 +30,10 @@ from airflow.operators.empty import EmptyOperator from airflow.utils.session import provide_session from airflow.utils.state import TaskInstanceState - -from dev.tests_common.test_utils.api_connexion_utils import assert_401, create_user, delete_user -from dev.tests_common.test_utils.config import conf_vars -from dev.tests_common.test_utils.db import clear_db_dags, clear_db_runs, clear_db_serialized_dags -from dev.tests_common.test_utils.www import _check_last_log +from tests_common.test_utils.api_connexion_utils import assert_401, create_user, delete_user +from tests_common.test_utils.config import conf_vars +from tests_common.test_utils.db import clear_db_dags, clear_db_runs, clear_db_serialized_dags +from tests_common.test_utils.www import _check_last_log pytestmark = [pytest.mark.db_test, pytest.mark.skip_if_database_isolation_mode] diff --git a/tests/api_connexion/endpoints/test_dag_parsing.py b/tests/api_connexion/endpoints/test_dag_parsing.py index 0fca8ee63c973..53648150c2c01 100644 --- a/tests/api_connexion/endpoints/test_dag_parsing.py +++ b/tests/api_connexion/endpoints/test_dag_parsing.py @@ -24,9 +24,8 @@ from airflow.models import DagBag from airflow.models.dagbag import DagPriorityParsingRequest - -from dev.tests_common.test_utils.api_connexion_utils import create_user, delete_user -from dev.tests_common.test_utils.db import clear_db_dag_parsing_requests +from tests_common.test_utils.api_connexion_utils import create_user, delete_user +from tests_common.test_utils.db import clear_db_dag_parsing_requests pytestmark = [pytest.mark.db_test, pytest.mark.skip_if_database_isolation_mode] diff --git a/tests/api_connexion/endpoints/test_dag_run_endpoint.py b/tests/api_connexion/endpoints/test_dag_run_endpoint.py index b881f5ea98638..bad9ff1481c4d 100644 --- a/tests/api_connexion/endpoints/test_dag_run_endpoint.py +++ b/tests/api_connexion/endpoints/test_dag_run_endpoint.py @@ -34,12 +34,11 @@ from airflow.utils.session import create_session, provide_session from airflow.utils.state import DagRunState, State from airflow.utils.types import DagRunType - -from dev.tests_common.test_utils.api_connexion_utils import assert_401, create_user, delete_user -from dev.tests_common.test_utils.compat import AIRFLOW_V_3_0_PLUS -from dev.tests_common.test_utils.config import conf_vars -from dev.tests_common.test_utils.db import clear_db_dags, clear_db_runs, clear_db_serialized_dags -from dev.tests_common.test_utils.www import _check_last_log +from tests_common.test_utils.api_connexion_utils import assert_401, create_user, delete_user +from tests_common.test_utils.compat import AIRFLOW_V_3_0_PLUS +from tests_common.test_utils.config import conf_vars +from tests_common.test_utils.db import clear_db_dags, clear_db_runs, clear_db_serialized_dags +from tests_common.test_utils.www import _check_last_log if AIRFLOW_V_3_0_PLUS: from airflow.utils.types import DagRunTriggeredByType diff --git a/tests/api_connexion/endpoints/test_dag_source_endpoint.py b/tests/api_connexion/endpoints/test_dag_source_endpoint.py index 80f32dc715a3c..8a5c91ae670a3 100644 --- a/tests/api_connexion/endpoints/test_dag_source_endpoint.py +++ b/tests/api_connexion/endpoints/test_dag_source_endpoint.py @@ -23,9 +23,8 @@ import pytest from airflow.models import DagBag - -from dev.tests_common.test_utils.api_connexion_utils import assert_401, create_user, delete_user -from dev.tests_common.test_utils.db import clear_db_dag_code, clear_db_dags, clear_db_serialized_dags +from tests_common.test_utils.api_connexion_utils import assert_401, create_user, delete_user +from tests_common.test_utils.db import clear_db_dag_code, clear_db_dags, clear_db_serialized_dags pytestmark = [pytest.mark.db_test, pytest.mark.skip_if_database_isolation_mode] diff --git a/tests/api_connexion/endpoints/test_dag_stats_endpoint.py b/tests/api_connexion/endpoints/test_dag_stats_endpoint.py index fe563b9444030..179662cd8f4ed 100644 --- a/tests/api_connexion/endpoints/test_dag_stats_endpoint.py +++ b/tests/api_connexion/endpoints/test_dag_stats_endpoint.py @@ -26,9 +26,8 @@ from airflow.utils.session import create_session from airflow.utils.state import DagRunState from airflow.utils.types import DagRunType - -from dev.tests_common.test_utils.api_connexion_utils import create_user, delete_user -from dev.tests_common.test_utils.db import clear_db_dags, clear_db_runs, clear_db_serialized_dags +from tests_common.test_utils.api_connexion_utils import create_user, delete_user +from tests_common.test_utils.db import clear_db_dags, clear_db_runs, clear_db_serialized_dags pytestmark = [pytest.mark.db_test, pytest.mark.skip_if_database_isolation_mode] diff --git a/tests/api_connexion/endpoints/test_dag_warning_endpoint.py b/tests/api_connexion/endpoints/test_dag_warning_endpoint.py index b9c00991413bb..f3521ed883c73 100644 --- a/tests/api_connexion/endpoints/test_dag_warning_endpoint.py +++ b/tests/api_connexion/endpoints/test_dag_warning_endpoint.py @@ -23,9 +23,8 @@ from airflow.models.dag import DagModel from airflow.models.dagwarning import DagWarning from airflow.utils.session import create_session - -from dev.tests_common.test_utils.api_connexion_utils import assert_401, create_user, delete_user -from dev.tests_common.test_utils.db import clear_db_dag_warnings, clear_db_dags +from tests_common.test_utils.api_connexion_utils import assert_401, create_user, delete_user +from tests_common.test_utils.db import clear_db_dag_warnings, clear_db_dags pytestmark = [pytest.mark.db_test, pytest.mark.skip_if_database_isolation_mode] diff --git a/tests/api_connexion/endpoints/test_event_log_endpoint.py b/tests/api_connexion/endpoints/test_event_log_endpoint.py index 42a610890ede2..bcd668c93cce6 100644 --- a/tests/api_connexion/endpoints/test_event_log_endpoint.py +++ b/tests/api_connexion/endpoints/test_event_log_endpoint.py @@ -21,10 +21,9 @@ from airflow.api_connexion.exceptions import EXCEPTIONS_LINK_MAP from airflow.models import Log from airflow.utils import timezone - -from dev.tests_common.test_utils.api_connexion_utils import assert_401, create_user, delete_user -from dev.tests_common.test_utils.config import conf_vars -from dev.tests_common.test_utils.db import clear_db_logs +from tests_common.test_utils.api_connexion_utils import assert_401, create_user, delete_user +from tests_common.test_utils.config import conf_vars +from tests_common.test_utils.db import clear_db_logs pytestmark = [pytest.mark.db_test, pytest.mark.skip_if_database_isolation_mode] diff --git a/tests/api_connexion/endpoints/test_extra_link_endpoint.py b/tests/api_connexion/endpoints/test_extra_link_endpoint.py index 373571a42ee47..30b8234cd746a 100644 --- a/tests/api_connexion/endpoints/test_extra_link_endpoint.py +++ b/tests/api_connexion/endpoints/test_extra_link_endpoint.py @@ -30,12 +30,11 @@ from airflow.utils import timezone from airflow.utils.state import DagRunState from airflow.utils.types import DagRunType - -from dev.tests_common.test_utils.api_connexion_utils import create_user, delete_user -from dev.tests_common.test_utils.compat import AIRFLOW_V_3_0_PLUS, BaseOperatorLink -from dev.tests_common.test_utils.db import clear_db_runs, clear_db_xcom -from dev.tests_common.test_utils.mock_operators import CustomOperator -from dev.tests_common.test_utils.mock_plugins import mock_plugin_manager +from tests_common.test_utils.api_connexion_utils import create_user, delete_user +from tests_common.test_utils.compat import AIRFLOW_V_3_0_PLUS, BaseOperatorLink +from tests_common.test_utils.db import clear_db_runs, clear_db_xcom +from tests_common.test_utils.mock_operators import CustomOperator +from tests_common.test_utils.mock_plugins import mock_plugin_manager if AIRFLOW_V_3_0_PLUS: from airflow.utils.types import DagRunTriggeredByType diff --git a/tests/api_connexion/endpoints/test_import_error_endpoint.py b/tests/api_connexion/endpoints/test_import_error_endpoint.py index f4f7d03b323f2..0e2ea9f97200c 100644 --- a/tests/api_connexion/endpoints/test_import_error_endpoint.py +++ b/tests/api_connexion/endpoints/test_import_error_endpoint.py @@ -23,11 +23,10 @@ from airflow.api_connexion.exceptions import EXCEPTIONS_LINK_MAP from airflow.utils import timezone from airflow.utils.session import provide_session - -from dev.tests_common.test_utils.api_connexion_utils import assert_401, create_user, delete_user -from dev.tests_common.test_utils.compat import ParseImportError -from dev.tests_common.test_utils.config import conf_vars -from dev.tests_common.test_utils.db import clear_db_dags, clear_db_import_errors +from tests_common.test_utils.api_connexion_utils import assert_401, create_user, delete_user +from tests_common.test_utils.compat import ParseImportError +from tests_common.test_utils.config import conf_vars +from tests_common.test_utils.db import clear_db_dags, clear_db_import_errors pytestmark = [pytest.mark.db_test, pytest.mark.skip_if_database_isolation_mode] diff --git a/tests/api_connexion/endpoints/test_log_endpoint.py b/tests/api_connexion/endpoints/test_log_endpoint.py index 21d4e8feb83ad..ef542a74d7a8f 100644 --- a/tests/api_connexion/endpoints/test_log_endpoint.py +++ b/tests/api_connexion/endpoints/test_log_endpoint.py @@ -32,9 +32,8 @@ from airflow.operators.empty import EmptyOperator from airflow.utils import timezone from airflow.utils.types import DagRunType - -from dev.tests_common.test_utils.api_connexion_utils import assert_401, create_user, delete_user -from dev.tests_common.test_utils.db import clear_db_runs +from tests_common.test_utils.api_connexion_utils import assert_401, create_user, delete_user +from tests_common.test_utils.db import clear_db_runs pytestmark = [pytest.mark.db_test, pytest.mark.skip_if_database_isolation_mode] diff --git a/tests/api_connexion/endpoints/test_mapped_task_instance_endpoint.py b/tests/api_connexion/endpoints/test_mapped_task_instance_endpoint.py index e41bbcc6c2e88..843de41f1b401 100644 --- a/tests/api_connexion/endpoints/test_mapped_task_instance_endpoint.py +++ b/tests/api_connexion/endpoints/test_mapped_task_instance_endpoint.py @@ -32,10 +32,9 @@ from airflow.utils.session import provide_session from airflow.utils.state import State, TaskInstanceState from airflow.utils.timezone import datetime - -from dev.tests_common.test_utils.api_connexion_utils import assert_401, create_user, delete_user -from dev.tests_common.test_utils.db import clear_db_runs, clear_db_sla_miss, clear_rendered_ti_fields -from dev.tests_common.test_utils.mock_operators import MockOperator +from tests_common.test_utils.api_connexion_utils import assert_401, create_user, delete_user +from tests_common.test_utils.db import clear_db_runs, clear_db_sla_miss, clear_rendered_ti_fields +from tests_common.test_utils.mock_operators import MockOperator pytestmark = [pytest.mark.db_test, pytest.mark.skip_if_database_isolation_mode] diff --git a/tests/api_connexion/endpoints/test_plugin_endpoint.py b/tests/api_connexion/endpoints/test_plugin_endpoint.py index 2831af06bf3d9..b04ec7b7d5823 100644 --- a/tests/api_connexion/endpoints/test_plugin_endpoint.py +++ b/tests/api_connexion/endpoints/test_plugin_endpoint.py @@ -28,11 +28,10 @@ from airflow.ti_deps.deps.base_ti_dep import BaseTIDep from airflow.timetables.base import Timetable from airflow.utils.module_loading import qualname - -from dev.tests_common.test_utils.api_connexion_utils import assert_401, create_user, delete_user -from dev.tests_common.test_utils.compat import BaseOperatorLink -from dev.tests_common.test_utils.config import conf_vars -from dev.tests_common.test_utils.mock_plugins import mock_plugin_manager +from tests_common.test_utils.api_connexion_utils import assert_401, create_user, delete_user +from tests_common.test_utils.compat import BaseOperatorLink +from tests_common.test_utils.config import conf_vars +from tests_common.test_utils.mock_plugins import mock_plugin_manager pytestmark = [pytest.mark.db_test, pytest.mark.skip_if_database_isolation_mode] diff --git a/tests/api_connexion/endpoints/test_pool_endpoint.py b/tests/api_connexion/endpoints/test_pool_endpoint.py index 455c417bd2581..d19dbf836d025 100644 --- a/tests/api_connexion/endpoints/test_pool_endpoint.py +++ b/tests/api_connexion/endpoints/test_pool_endpoint.py @@ -21,11 +21,10 @@ from airflow.api_connexion.exceptions import EXCEPTIONS_LINK_MAP from airflow.models.pool import Pool from airflow.utils.session import provide_session - -from dev.tests_common.test_utils.api_connexion_utils import assert_401, create_user, delete_user -from dev.tests_common.test_utils.config import conf_vars -from dev.tests_common.test_utils.db import clear_db_pools -from dev.tests_common.test_utils.www import _check_last_log +from tests_common.test_utils.api_connexion_utils import assert_401, create_user, delete_user +from tests_common.test_utils.config import conf_vars +from tests_common.test_utils.db import clear_db_pools +from tests_common.test_utils.www import _check_last_log pytestmark = [pytest.mark.db_test, pytest.mark.skip_if_database_isolation_mode] diff --git a/tests/api_connexion/endpoints/test_provider_endpoint.py b/tests/api_connexion/endpoints/test_provider_endpoint.py index 92e14887ec038..c526aabe8c005 100644 --- a/tests/api_connexion/endpoints/test_provider_endpoint.py +++ b/tests/api_connexion/endpoints/test_provider_endpoint.py @@ -21,8 +21,7 @@ import pytest from airflow.providers_manager import ProviderInfo - -from dev.tests_common.test_utils.api_connexion_utils import create_user, delete_user +from tests_common.test_utils.api_connexion_utils import create_user, delete_user pytestmark = [pytest.mark.db_test, pytest.mark.skip_if_database_isolation_mode] diff --git a/tests/api_connexion/endpoints/test_task_endpoint.py b/tests/api_connexion/endpoints/test_task_endpoint.py index 60237946a82ca..567394208510b 100644 --- a/tests/api_connexion/endpoints/test_task_endpoint.py +++ b/tests/api_connexion/endpoints/test_task_endpoint.py @@ -27,9 +27,8 @@ from airflow.models.expandinput import EXPAND_INPUT_EMPTY from airflow.models.serialized_dag import SerializedDagModel from airflow.operators.empty import EmptyOperator - -from dev.tests_common.test_utils.api_connexion_utils import assert_401, create_user, delete_user -from dev.tests_common.test_utils.db import clear_db_dags, clear_db_runs, clear_db_serialized_dags +from tests_common.test_utils.api_connexion_utils import assert_401, create_user, delete_user +from tests_common.test_utils.db import clear_db_dags, clear_db_runs, clear_db_serialized_dags pytestmark = [pytest.mark.db_test, pytest.mark.skip_if_database_isolation_mode] diff --git a/tests/api_connexion/endpoints/test_task_instance_endpoint.py b/tests/api_connexion/endpoints/test_task_instance_endpoint.py index 809c2fab9aa2d..bec52292fbe46 100644 --- a/tests/api_connexion/endpoints/test_task_instance_endpoint.py +++ b/tests/api_connexion/endpoints/test_task_instance_endpoint.py @@ -35,10 +35,9 @@ from airflow.utils.state import State from airflow.utils.timezone import datetime from airflow.utils.types import DagRunType - -from dev.tests_common.test_utils.api_connexion_utils import assert_401, create_user, delete_user -from dev.tests_common.test_utils.db import clear_db_runs, clear_db_sla_miss, clear_rendered_ti_fields -from dev.tests_common.test_utils.www import _check_last_log +from tests_common.test_utils.api_connexion_utils import assert_401, create_user, delete_user +from tests_common.test_utils.db import clear_db_runs, clear_db_sla_miss, clear_rendered_ti_fields +from tests_common.test_utils.www import _check_last_log pytestmark = [pytest.mark.db_test, pytest.mark.skip_if_database_isolation_mode] diff --git a/tests/api_connexion/endpoints/test_variable_endpoint.py b/tests/api_connexion/endpoints/test_variable_endpoint.py index e4302636184d3..640251ebc14f3 100644 --- a/tests/api_connexion/endpoints/test_variable_endpoint.py +++ b/tests/api_connexion/endpoints/test_variable_endpoint.py @@ -22,11 +22,10 @@ from airflow.api_connexion.exceptions import EXCEPTIONS_LINK_MAP from airflow.models import Variable - -from dev.tests_common.test_utils.api_connexion_utils import assert_401, create_user, delete_user -from dev.tests_common.test_utils.config import conf_vars -from dev.tests_common.test_utils.db import clear_db_variables -from dev.tests_common.test_utils.www import _check_last_log +from tests_common.test_utils.api_connexion_utils import assert_401, create_user, delete_user +from tests_common.test_utils.config import conf_vars +from tests_common.test_utils.db import clear_db_variables +from tests_common.test_utils.www import _check_last_log pytestmark = [pytest.mark.db_test, pytest.mark.skip_if_database_isolation_mode] diff --git a/tests/api_connexion/endpoints/test_xcom_endpoint.py b/tests/api_connexion/endpoints/test_xcom_endpoint.py index 0293e672c47d2..12d56ae9894ea 100644 --- a/tests/api_connexion/endpoints/test_xcom_endpoint.py +++ b/tests/api_connexion/endpoints/test_xcom_endpoint.py @@ -30,10 +30,9 @@ from airflow.utils.session import create_session from airflow.utils.timezone import utcnow from airflow.utils.types import DagRunType - -from dev.tests_common.test_utils.api_connexion_utils import assert_401, create_user, delete_user -from dev.tests_common.test_utils.config import conf_vars -from dev.tests_common.test_utils.db import clear_db_dags, clear_db_runs, clear_db_xcom +from tests_common.test_utils.api_connexion_utils import assert_401, create_user, delete_user +from tests_common.test_utils.config import conf_vars +from tests_common.test_utils.db import clear_db_dags, clear_db_runs, clear_db_xcom pytestmark = [pytest.mark.db_test, pytest.mark.skip_if_database_isolation_mode] diff --git a/tests/api_connexion/schemas/test_connection_schema.py b/tests/api_connexion/schemas/test_connection_schema.py index d7a0de4e89f05..e52b573875138 100644 --- a/tests/api_connexion/schemas/test_connection_schema.py +++ b/tests/api_connexion/schemas/test_connection_schema.py @@ -30,8 +30,7 @@ ) from airflow.models import Connection from airflow.utils.session import create_session, provide_session - -from dev.tests_common.test_utils.db import clear_db_connections +from tests_common.test_utils.db import clear_db_connections pytestmark = [pytest.mark.db_test, pytest.mark.skip_if_database_isolation_mode] diff --git a/tests/api_connexion/schemas/test_dag_run_schema.py b/tests/api_connexion/schemas/test_dag_run_schema.py index b874ade4442ff..929a8af451112 100644 --- a/tests/api_connexion/schemas/test_dag_run_schema.py +++ b/tests/api_connexion/schemas/test_dag_run_schema.py @@ -29,9 +29,8 @@ from airflow.utils import timezone from airflow.utils.session import provide_session from airflow.utils.types import DagRunType - -from dev.tests_common.test_utils.compat import AIRFLOW_V_3_0_PLUS -from dev.tests_common.test_utils.db import clear_db_runs +from tests_common.test_utils.compat import AIRFLOW_V_3_0_PLUS +from tests_common.test_utils.db import clear_db_runs if AIRFLOW_V_3_0_PLUS: from airflow.utils.types import DagRunTriggeredByType diff --git a/tests/api_connexion/schemas/test_dataset_schema.py b/tests/api_connexion/schemas/test_dataset_schema.py index 769de6f1b10eb..669b87f6cf636 100644 --- a/tests/api_connexion/schemas/test_dataset_schema.py +++ b/tests/api_connexion/schemas/test_dataset_schema.py @@ -30,8 +30,7 @@ from airflow.assets import Asset from airflow.models.asset import AssetAliasModel, AssetEvent, AssetModel from airflow.operators.empty import EmptyOperator - -from dev.tests_common.test_utils.db import clear_db_assets, clear_db_dags +from tests_common.test_utils.db import clear_db_assets, clear_db_dags pytestmark = [pytest.mark.db_test, pytest.mark.skip_if_database_isolation_mode] diff --git a/tests/api_connexion/schemas/test_error_schema.py b/tests/api_connexion/schemas/test_error_schema.py index 5c358f2e2c374..5f31dfe2f1460 100644 --- a/tests/api_connexion/schemas/test_error_schema.py +++ b/tests/api_connexion/schemas/test_error_schema.py @@ -25,9 +25,8 @@ ) from airflow.utils import timezone from airflow.utils.session import provide_session - -from dev.tests_common.test_utils.compat import ParseImportError -from dev.tests_common.test_utils.db import clear_db_import_errors +from tests_common.test_utils.compat import ParseImportError +from tests_common.test_utils.db import clear_db_import_errors pytestmark = [pytest.mark.db_test, pytest.mark.skip_if_database_isolation_mode] diff --git a/tests/api_connexion/schemas/test_plugin_schema.py b/tests/api_connexion/schemas/test_plugin_schema.py index ee079ce664348..df550a8301bdd 100644 --- a/tests/api_connexion/schemas/test_plugin_schema.py +++ b/tests/api_connexion/schemas/test_plugin_schema.py @@ -28,8 +28,7 @@ ) from airflow.hooks.base import BaseHook from airflow.plugins_manager import AirflowPlugin - -from dev.tests_common.test_utils.compat import BaseOperatorLink +from tests_common.test_utils.compat import BaseOperatorLink class PluginHook(BaseHook): ... diff --git a/tests/api_connexion/schemas/test_pool_schemas.py b/tests/api_connexion/schemas/test_pool_schemas.py index 23788426c5018..3e5f3d7f02904 100644 --- a/tests/api_connexion/schemas/test_pool_schemas.py +++ b/tests/api_connexion/schemas/test_pool_schemas.py @@ -21,8 +21,7 @@ from airflow.api_connexion.schemas.pool_schema import PoolCollection, pool_collection_schema, pool_schema from airflow.models.pool import Pool from airflow.utils.session import provide_session - -from dev.tests_common.test_utils.db import clear_db_pools +from tests_common.test_utils.db import clear_db_pools pytestmark = [pytest.mark.db_test, pytest.mark.skip_if_database_isolation_mode] diff --git a/tests/api_connexion/schemas/test_xcom_schema.py b/tests/api_connexion/schemas/test_xcom_schema.py index 06c36c31b7767..366d707878b9c 100644 --- a/tests/api_connexion/schemas/test_xcom_schema.py +++ b/tests/api_connexion/schemas/test_xcom_schema.py @@ -30,8 +30,7 @@ from airflow.models import DagRun, XCom from airflow.utils.dates import parse_execution_date from airflow.utils.session import create_session - -from dev.tests_common.test_utils.config import conf_vars +from tests_common.test_utils.config import conf_vars pytestmark = [pytest.mark.db_test, pytest.mark.skip_if_database_isolation_mode] diff --git a/tests/api_connexion/test_auth.py b/tests/api_connexion/test_auth.py index e568d618ad662..65e98c18c974d 100644 --- a/tests/api_connexion/test_auth.py +++ b/tests/api_connexion/test_auth.py @@ -22,10 +22,9 @@ from airflow.auth.managers.simple.simple_auth_manager import SimpleAuthManager from airflow.auth.managers.simple.user import SimpleAuthManagerUser - -from dev.tests_common.test_utils.api_connexion_utils import assert_401 -from dev.tests_common.test_utils.config import conf_vars -from dev.tests_common.test_utils.db import clear_db_pools +from tests_common.test_utils.api_connexion_utils import assert_401 +from tests_common.test_utils.config import conf_vars +from tests_common.test_utils.db import clear_db_pools pytestmark = [pytest.mark.db_test, pytest.mark.skip_if_database_isolation_mode] diff --git a/tests/api_connexion/test_parameters.py b/tests/api_connexion/test_parameters.py index 57c9c05415f65..26fdcfa7aeca0 100644 --- a/tests/api_connexion/test_parameters.py +++ b/tests/api_connexion/test_parameters.py @@ -29,8 +29,7 @@ validate_istimezone, ) from airflow.utils import timezone - -from dev.tests_common.test_utils.config import conf_vars +from tests_common.test_utils.config import conf_vars class TestValidateIsTimezone: diff --git a/tests/api_connexion/test_security.py b/tests/api_connexion/test_security.py index 2051cf613510e..bebf2ec340a60 100644 --- a/tests/api_connexion/test_security.py +++ b/tests/api_connexion/test_security.py @@ -18,7 +18,7 @@ import pytest -from dev.tests_common.test_utils.api_connexion_utils import create_user, delete_user +from tests_common.test_utils.api_connexion_utils import create_user, delete_user pytestmark = [pytest.mark.db_test, pytest.mark.skip_if_database_isolation_mode] diff --git a/tests/api_fastapi/views/public/test_connections.py b/tests/api_fastapi/views/public/test_connections.py index a5cb301a43136..a0da0d2b9b28e 100644 --- a/tests/api_fastapi/views/public/test_connections.py +++ b/tests/api_fastapi/views/public/test_connections.py @@ -20,8 +20,7 @@ from airflow.models import Connection from airflow.utils.session import provide_session - -from dev.tests_common.test_utils.db import clear_db_connections +from tests_common.test_utils.db import clear_db_connections pytestmark = pytest.mark.db_test diff --git a/tests/api_fastapi/views/public/test_dag_run.py b/tests/api_fastapi/views/public/test_dag_run.py index 377aca4553d86..3c60b307bbbd2 100644 --- a/tests/api_fastapi/views/public/test_dag_run.py +++ b/tests/api_fastapi/views/public/test_dag_run.py @@ -25,8 +25,7 @@ from airflow.utils.session import provide_session from airflow.utils.state import DagRunState from airflow.utils.types import DagRunTriggeredByType, DagRunType - -from dev.tests_common.test_utils.db import clear_db_dags, clear_db_runs, clear_db_serialized_dags +from tests_common.test_utils.db import clear_db_dags, clear_db_runs, clear_db_serialized_dags pytestmark = pytest.mark.db_test diff --git a/tests/api_fastapi/views/public/test_dags.py b/tests/api_fastapi/views/public/test_dags.py index 8bc10407e6287..cd1809cb70d3d 100644 --- a/tests/api_fastapi/views/public/test_dags.py +++ b/tests/api_fastapi/views/public/test_dags.py @@ -27,8 +27,7 @@ from airflow.utils.session import provide_session from airflow.utils.state import DagRunState from airflow.utils.types import DagRunType - -from dev.tests_common.test_utils.db import clear_db_dags, clear_db_runs, clear_db_serialized_dags +from tests_common.test_utils.db import clear_db_dags, clear_db_runs, clear_db_serialized_dags pytestmark = pytest.mark.db_test diff --git a/tests/api_fastapi/views/public/test_variables.py b/tests/api_fastapi/views/public/test_variables.py index 58a09538a971a..21f86c428b397 100644 --- a/tests/api_fastapi/views/public/test_variables.py +++ b/tests/api_fastapi/views/public/test_variables.py @@ -20,8 +20,7 @@ from airflow.models.variable import Variable from airflow.utils.session import provide_session - -from dev.tests_common.test_utils.db import clear_db_variables +from tests_common.test_utils.db import clear_db_variables pytestmark = pytest.mark.db_test diff --git a/tests/api_fastapi/views/ui/test_assets.py b/tests/api_fastapi/views/ui/test_assets.py index d0e93c709b076..d06631ec88b59 100644 --- a/tests/api_fastapi/views/ui/test_assets.py +++ b/tests/api_fastapi/views/ui/test_assets.py @@ -20,8 +20,7 @@ from airflow.assets import Asset from airflow.operators.empty import EmptyOperator - -from dev.tests_common.test_utils.db import initial_db_init +from tests_common.test_utils.db import initial_db_init pytestmark = pytest.mark.db_test diff --git a/tests/api_fastapi/views/ui/test_dashboard.py b/tests/api_fastapi/views/ui/test_dashboard.py index bee683535704f..f4a061f1dd0ff 100644 --- a/tests/api_fastapi/views/ui/test_dashboard.py +++ b/tests/api_fastapi/views/ui/test_dashboard.py @@ -26,8 +26,7 @@ from airflow.operators.empty import EmptyOperator from airflow.utils.state import DagRunState, TaskInstanceState from airflow.utils.types import DagRunType - -from dev.tests_common.test_utils.db import clear_db_runs +from tests_common.test_utils.db import clear_db_runs pytestmark = pytest.mark.db_test diff --git a/tests/api_internal/endpoints/test_rpc_api_endpoint.py b/tests/api_internal/endpoints/test_rpc_api_endpoint.py index 364b0f44eaf27..72ce2afe4c19f 100644 --- a/tests/api_internal/endpoints/test_rpc_api_endpoint.py +++ b/tests/api_internal/endpoints/test_rpc_api_endpoint.py @@ -34,9 +34,8 @@ from airflow.utils.jwt_signer import JWTSigner from airflow.utils.state import State from airflow.www import app - -from dev.tests_common.test_utils.config import conf_vars -from dev.tests_common.test_utils.decorators import dont_initialize_flask_app_submodules +from tests_common.test_utils.config import conf_vars +from tests_common.test_utils.decorators import dont_initialize_flask_app_submodules # Note: Sounds a bit strange to disable internal API tests in isolation mode but... # As long as the test is modelled to run its own internal API endpoints, it is conflicting diff --git a/tests/api_internal/test_internal_api_call.py b/tests/api_internal/test_internal_api_call.py index 02ae2d9f55125..880e1e89b0388 100644 --- a/tests/api_internal/test_internal_api_call.py +++ b/tests/api_internal/test_internal_api_call.py @@ -34,8 +34,7 @@ from airflow.serialization.serialized_objects import BaseSerialization from airflow.settings import _ENABLE_AIP_44 from airflow.utils.state import State - -from dev.tests_common.test_utils.config import conf_vars +from tests_common.test_utils.config import conf_vars if TYPE_CHECKING: from airflow.serialization.pydantic.taskinstance import TaskInstancePydantic diff --git a/tests/assets/test_manager.py b/tests/assets/test_manager.py index cd4563d9a9c4e..f2dcc88b8338b 100644 --- a/tests/assets/test_manager.py +++ b/tests/assets/test_manager.py @@ -38,6 +38,7 @@ from airflow.models.dag import DagModel from airflow.models.dagbag import DagPriorityParsingRequest from airflow.serialization.pydantic.taskinstance import TaskInstancePydantic + from tests.listeners import asset_listener pytestmark = pytest.mark.db_test @@ -48,7 +49,7 @@ @pytest.fixture def clear_assets(): - from dev.tests_common.test_utils.db import clear_db_assets + from tests_common.test_utils.db import clear_db_assets clear_db_assets() yield diff --git a/tests/assets/tests_asset.py b/tests/assets/tests_asset.py index 10d91e7a00fb7..0bcfb83e88a79 100644 --- a/tests/assets/tests_asset.py +++ b/tests/assets/tests_asset.py @@ -43,7 +43,7 @@ @pytest.fixture def clear_assets(): - from dev.tests_common.test_utils.db import clear_db_assets + from tests_common.test_utils.db import clear_db_assets clear_db_assets() yield diff --git a/tests/auth/managers/simple/views/test_auth.py b/tests/auth/managers/simple/views/test_auth.py index f61a9278f79a5..49f6237fc7e44 100644 --- a/tests/auth/managers/simple/views/test_auth.py +++ b/tests/auth/managers/simple/views/test_auth.py @@ -23,8 +23,7 @@ from airflow.auth.managers.simple.simple_auth_manager import SimpleAuthManager from airflow.www import app as application - -from dev.tests_common.test_utils.config import conf_vars +from tests_common.test_utils.config import conf_vars @pytest.fixture diff --git a/tests/cli/commands/test_backfill_command.py b/tests/cli/commands/test_backfill_command.py index c01e1e4f9d07b..e798436f24445 100644 --- a/tests/cli/commands/test_backfill_command.py +++ b/tests/cli/commands/test_backfill_command.py @@ -28,8 +28,7 @@ from airflow.cli import cli_parser from airflow.models import DagBag from airflow.utils import timezone - -from dev.tests_common.test_utils.db import clear_db_backfills, clear_db_dags, clear_db_runs +from tests_common.test_utils.db import clear_db_backfills, clear_db_dags, clear_db_runs DEFAULT_DATE = timezone.make_aware(datetime(2015, 1, 1), timezone=timezone.utc) if pendulum.__version__.startswith("3"): diff --git a/tests/cli/commands/test_celery_command.py b/tests/cli/commands/test_celery_command.py index c29d835d8ee07..7e20a9c933f94 100644 --- a/tests/cli/commands/test_celery_command.py +++ b/tests/cli/commands/test_celery_command.py @@ -30,8 +30,7 @@ from airflow.cli.commands import celery_command from airflow.configuration import conf from airflow.executors import executor_loader - -from dev.tests_common.test_utils.config import conf_vars +from tests_common.test_utils.config import conf_vars pytestmark = [pytest.mark.db_test, pytest.mark.skip_if_database_isolation_mode] diff --git a/tests/cli/commands/test_config_command.py b/tests/cli/commands/test_config_command.py index 90d38fa27ad03..3202990664285 100644 --- a/tests/cli/commands/test_config_command.py +++ b/tests/cli/commands/test_config_command.py @@ -22,8 +22,7 @@ from airflow.cli import cli_parser from airflow.cli.commands import config_command - -from dev.tests_common.test_utils.config import conf_vars +from tests_common.test_utils.config import conf_vars STATSD_CONFIG_BEGIN_WITH = "# `StatsD `" diff --git a/tests/cli/commands/test_connection_command.py b/tests/cli/commands/test_connection_command.py index 06578eb1492c1..a04775433f468 100644 --- a/tests/cli/commands/test_connection_command.py +++ b/tests/cli/commands/test_connection_command.py @@ -33,8 +33,7 @@ from airflow.models import Connection from airflow.utils.db import merge_conn from airflow.utils.session import create_session - -from dev.tests_common.test_utils.db import clear_db_connections +from tests_common.test_utils.db import clear_db_connections pytestmark = [pytest.mark.db_test, pytest.mark.skip_if_database_isolation_mode] diff --git a/tests/cli/commands/test_dag_command.py b/tests/cli/commands/test_dag_command.py index e9d10a2e33c18..fe48ec5f357cb 100644 --- a/tests/cli/commands/test_dag_command.py +++ b/tests/cli/commands/test_dag_command.py @@ -46,10 +46,10 @@ from airflow.utils.session import create_session from airflow.utils.state import DagRunState from airflow.utils.types import DagRunType -from tests.models import TEST_DAGS_FOLDER +from tests_common.test_utils.config import conf_vars +from tests_common.test_utils.db import clear_db_dags, clear_db_runs -from dev.tests_common.test_utils.config import conf_vars -from dev.tests_common.test_utils.db import clear_db_dags, clear_db_runs +from tests.models import TEST_DAGS_FOLDER DEFAULT_DATE = timezone.make_aware(datetime(2015, 1, 1), timezone=timezone.utc) if pendulum.__version__.startswith("3"): diff --git a/tests/cli/commands/test_dag_processor_command.py b/tests/cli/commands/test_dag_processor_command.py index 643710ce1e415..71a30dcd7d89b 100644 --- a/tests/cli/commands/test_dag_processor_command.py +++ b/tests/cli/commands/test_dag_processor_command.py @@ -24,8 +24,7 @@ from airflow.cli import cli_parser from airflow.cli.commands import dag_processor_command from airflow.configuration import conf - -from dev.tests_common.test_utils.config import conf_vars +from tests_common.test_utils.config import conf_vars pytestmark = [pytest.mark.db_test, pytest.mark.skip_if_database_isolation_mode] diff --git a/tests/cli/commands/test_fastapi_api_command.py b/tests/cli/commands/test_fastapi_api_command.py index 2de4b729bfb0e..b1a02b3b186e1 100644 --- a/tests/cli/commands/test_fastapi_api_command.py +++ b/tests/cli/commands/test_fastapi_api_command.py @@ -27,6 +27,7 @@ from airflow.cli.commands import fastapi_api_command from airflow.exceptions import AirflowConfigException + from tests.cli.commands._common_cli_classes import _CommonCLIGunicornTestClass console = Console(width=400, color_system="standard") diff --git a/tests/cli/commands/test_info_command.py b/tests/cli/commands/test_info_command.py index c6bea2d8a5bb8..ca5db5819c04b 100644 --- a/tests/cli/commands/test_info_command.py +++ b/tests/cli/commands/test_info_command.py @@ -32,8 +32,7 @@ from airflow.config_templates import airflow_local_settings from airflow.logging_config import configure_logging from airflow.version import version as airflow_version - -from dev.tests_common.test_utils.config import conf_vars +from tests_common.test_utils.config import conf_vars def capture_show_output(instance): diff --git a/tests/cli/commands/test_internal_api_command.py b/tests/cli/commands/test_internal_api_command.py index 11123c7c211a1..f3dd664d1a273 100644 --- a/tests/cli/commands/test_internal_api_command.py +++ b/tests/cli/commands/test_internal_api_command.py @@ -31,9 +31,9 @@ from airflow.cli.commands import internal_api_command from airflow.cli.commands.internal_api_command import GunicornMonitor from airflow.settings import _ENABLE_AIP_44 -from tests.cli.commands._common_cli_classes import _CommonCLIGunicornTestClass +from tests_common.test_utils.config import conf_vars -from dev.tests_common.test_utils.config import conf_vars +from tests.cli.commands._common_cli_classes import _CommonCLIGunicornTestClass console = Console(width=400, color_system="standard") diff --git a/tests/cli/commands/test_jobs_command.py b/tests/cli/commands/test_jobs_command.py index 61540a68c51c6..1c52aa71334e4 100644 --- a/tests/cli/commands/test_jobs_command.py +++ b/tests/cli/commands/test_jobs_command.py @@ -27,8 +27,7 @@ from airflow.jobs.scheduler_job_runner import SchedulerJobRunner from airflow.utils.session import create_session from airflow.utils.state import JobState, State - -from dev.tests_common.test_utils.db import clear_db_jobs +from tests_common.test_utils.db import clear_db_jobs @pytest.mark.skip_if_database_isolation_mode diff --git a/tests/cli/commands/test_kerberos_command.py b/tests/cli/commands/test_kerberos_command.py index 4a5e73ece788f..5d2f2e513bcc5 100644 --- a/tests/cli/commands/test_kerberos_command.py +++ b/tests/cli/commands/test_kerberos_command.py @@ -23,8 +23,7 @@ from airflow.cli import cli_parser from airflow.cli.commands import kerberos_command from airflow.security.kerberos import KerberosMode - -from dev.tests_common.test_utils.config import conf_vars +from tests_common.test_utils.config import conf_vars pytestmark = [pytest.mark.db_test, pytest.mark.skip_if_database_isolation_mode] diff --git a/tests/cli/commands/test_kubernetes_command.py b/tests/cli/commands/test_kubernetes_command.py index 1e53bdc77d8d8..dbde7a89664ed 100644 --- a/tests/cli/commands/test_kubernetes_command.py +++ b/tests/cli/commands/test_kubernetes_command.py @@ -28,8 +28,7 @@ from airflow.cli import cli_parser from airflow.cli.commands import kubernetes_command from airflow.executors import executor_loader - -from dev.tests_common.test_utils.config import conf_vars +from tests_common.test_utils.config import conf_vars pytestmark = [pytest.mark.db_test, pytest.mark.skip_if_database_isolation_mode] diff --git a/tests/cli/commands/test_plugins_command.py b/tests/cli/commands/test_plugins_command.py index 703b6879d7a3a..00d6cee5a0b5d 100644 --- a/tests/cli/commands/test_plugins_command.py +++ b/tests/cli/commands/test_plugins_command.py @@ -28,9 +28,9 @@ from airflow.hooks.base import BaseHook from airflow.listeners.listener import get_listener_manager from airflow.plugins_manager import AirflowPlugin -from tests.plugins.test_plugin import AirflowTestPlugin as ComplexAirflowPlugin +from tests_common.test_utils.mock_plugins import mock_plugin_manager -from dev.tests_common.test_utils.mock_plugins import mock_plugin_manager +from tests.plugins.test_plugin import AirflowTestPlugin as ComplexAirflowPlugin pytestmark = [pytest.mark.db_test, pytest.mark.skip_if_database_isolation_mode] @@ -89,15 +89,15 @@ def test_should_display_one_plugin(self): } ], "global_operator_extra_links": [ - "", - "", + "", + "", ], "timetables": ["tests.plugins.test_plugin.CustomCronDataIntervalTimetable"], "operator_extra_links": [ - "", - "", - "", - "", + "", + "", + "", + "", ], "hooks": ["tests.plugins.test_plugin.PluginHook"], "listeners": [ diff --git a/tests/cli/commands/test_rotate_fernet_key_command.py b/tests/cli/commands/test_rotate_fernet_key_command.py index d638c2010e187..473c911d9a10c 100644 --- a/tests/cli/commands/test_rotate_fernet_key_command.py +++ b/tests/cli/commands/test_rotate_fernet_key_command.py @@ -26,9 +26,8 @@ from airflow.hooks.base import BaseHook from airflow.models import Connection, Variable from airflow.utils.session import provide_session - -from dev.tests_common.test_utils.config import conf_vars -from dev.tests_common.test_utils.db import clear_db_connections, clear_db_variables +from tests_common.test_utils.config import conf_vars +from tests_common.test_utils.db import clear_db_connections, clear_db_variables pytestmark = [pytest.mark.db_test, pytest.mark.skip_if_database_isolation_mode] diff --git a/tests/cli/commands/test_scheduler_command.py b/tests/cli/commands/test_scheduler_command.py index 8fce5d6e289b3..a6adb514f203b 100644 --- a/tests/cli/commands/test_scheduler_command.py +++ b/tests/cli/commands/test_scheduler_command.py @@ -29,8 +29,7 @@ from airflow.executors import executor_loader from airflow.utils.scheduler_health import HealthServer, serve_health_check from airflow.utils.serve_logs import serve_logs - -from dev.tests_common.test_utils.config import conf_vars +from tests_common.test_utils.config import conf_vars pytestmark = [pytest.mark.db_test, pytest.mark.skip_if_database_isolation_mode] diff --git a/tests/cli/commands/test_task_command.py b/tests/cli/commands/test_task_command.py index fb512792eb324..823172cffc555 100644 --- a/tests/cli/commands/test_task_command.py +++ b/tests/cli/commands/test_task_command.py @@ -51,10 +51,9 @@ from airflow.utils.session import create_session from airflow.utils.state import State, TaskInstanceState from airflow.utils.types import DagRunType - -from dev.tests_common.test_utils.compat import AIRFLOW_V_3_0_PLUS -from dev.tests_common.test_utils.config import conf_vars -from dev.tests_common.test_utils.db import clear_db_pools, clear_db_runs +from tests_common.test_utils.compat import AIRFLOW_V_3_0_PLUS +from tests_common.test_utils.config import conf_vars +from tests_common.test_utils.db import clear_db_pools, clear_db_runs if AIRFLOW_V_3_0_PLUS: from airflow.utils.types import DagRunTriggeredByType diff --git a/tests/cli/commands/test_variable_command.py b/tests/cli/commands/test_variable_command.py index d35184c73c80a..630e7d321d3e0 100644 --- a/tests/cli/commands/test_variable_command.py +++ b/tests/cli/commands/test_variable_command.py @@ -29,8 +29,7 @@ from airflow.cli.commands import variable_command from airflow.models import Variable from airflow.utils.session import create_session - -from dev.tests_common.test_utils.db import clear_db_variables +from tests_common.test_utils.db import clear_db_variables pytestmark = [pytest.mark.db_test, pytest.mark.skip_if_database_isolation_mode] diff --git a/tests/cli/commands/test_webserver_command.py b/tests/cli/commands/test_webserver_command.py index b72f4e4596035..a2cba19c9a216 100644 --- a/tests/cli/commands/test_webserver_command.py +++ b/tests/cli/commands/test_webserver_command.py @@ -30,9 +30,9 @@ from airflow.cli import cli_parser from airflow.cli.commands import webserver_command from airflow.cli.commands.webserver_command import GunicornMonitor -from tests.cli.commands._common_cli_classes import _CommonCLIGunicornTestClass +from tests_common.test_utils.config import conf_vars -from dev.tests_common.test_utils.config import conf_vars +from tests.cli.commands._common_cli_classes import _CommonCLIGunicornTestClass console = Console(width=400, color_system="standard") diff --git a/tests/cli/conftest.py b/tests/cli/conftest.py index 61e27b0e74de4..83aeecdbb1ffb 100644 --- a/tests/cli/conftest.py +++ b/tests/cli/conftest.py @@ -25,8 +25,7 @@ from airflow.models.dagbag import DagBag from airflow.providers.celery.executors import celery_executor, celery_kubernetes_executor from airflow.providers.cncf.kubernetes.executors import kubernetes_executor, local_kubernetes_executor - -from dev.tests_common.test_utils.config import conf_vars +from tests_common.test_utils.config import conf_vars # Create custom executors here because conftest is imported first custom_executor_module = type(sys)("custom_executor") diff --git a/tests/cli/test_cli_parser.py b/tests/cli/test_cli_parser.py index 46ac36803face..f777908c23d19 100644 --- a/tests/cli/test_cli_parser.py +++ b/tests/cli/test_cli_parser.py @@ -43,8 +43,7 @@ from airflow.executors.local_executor import LocalExecutor from airflow.providers.amazon.aws.executors.ecs.ecs_executor import AwsEcsExecutor from airflow.providers.celery.executors.celery_executor import CeleryExecutor - -from dev.tests_common.test_utils.config import conf_vars +from tests_common.test_utils.config import conf_vars pytestmark = pytest.mark.db_test diff --git a/tests/conftest.py b/tests/conftest.py index f956865e7a1c6..c5c6441f0b55f 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -26,14 +26,14 @@ # unit test mode config is set as early as possible. assert "airflow" not in sys.modules, "No airflow module can be imported before these lines" -pytest_plugins = "dev.tests_common.pytest_plugin" +pytest_plugins = "tests_common.pytest_plugin" # Ignore files that are really test dags to be ignored by pytest collect_ignore = [ "tests/dags/subdir1/test_ignore_this.py", "tests/dags/test_invalid_dup_task.py", "tests/dags_corrupted/test_impersonation_custom.py", - "dev.tests_common.test_utils/perf/dags/elastic_dag.py", + "tests_common.test_utils/perf/dags/elastic_dag.py", ] diff --git a/tests/core/test_configuration.py b/tests/core/test_configuration.py index 0690a5f0182dc..1f376c955f503 100644 --- a/tests/core/test_configuration.py +++ b/tests/core/test_configuration.py @@ -42,6 +42,9 @@ write_default_airflow_configuration_if_needed, ) from airflow.providers_manager import ProvidersManager +from tests_common.test_utils.config import conf_vars +from tests_common.test_utils.reset_warning_registry import reset_warning_registry + from tests.utils.test_config import ( remove_all_configurations, set_deprecated_options, @@ -49,9 +52,6 @@ use_config, ) -from dev.tests_common.test_utils.config import conf_vars -from dev.tests_common.test_utils.reset_warning_registry import reset_warning_registry - HOME_DIR = os.path.expanduser("~") # The conf has been updated with sql_alchemy_con and deactivate_stale_dags_interval to test the diff --git a/tests/core/test_core.py b/tests/core/test_core.py index 13b85a9ef1700..2186d04f195b2 100644 --- a/tests/core/test_core.py +++ b/tests/core/test_core.py @@ -32,8 +32,7 @@ from airflow.providers.standard.operators.bash import BashOperator from airflow.utils.timezone import datetime from airflow.utils.types import DagRunType - -from dev.tests_common.test_utils.db import clear_db_dags, clear_db_runs, clear_db_task_fail +from tests_common.test_utils.db import clear_db_dags, clear_db_runs, clear_db_task_fail pytestmark = [pytest.mark.db_test, pytest.mark.skip_if_database_isolation_mode] diff --git a/tests/core/test_example_dags_system.py b/tests/core/test_example_dags_system.py index bd34d9bb15919..a0d2a60d85299 100644 --- a/tests/core/test_example_dags_system.py +++ b/tests/core/test_example_dags_system.py @@ -28,9 +28,8 @@ from airflow.utils.module_loading import import_string from airflow.utils.state import DagRunState from airflow.utils.trigger_rule import TriggerRule - -from dev.tests_common.test_utils.system_tests import get_test_run -from dev.tests_common.test_utils.system_tests_class import SystemTest +from tests_common.test_utils.system_tests import get_test_run +from tests_common.test_utils.system_tests_class import SystemTest def fail(): diff --git a/tests/core/test_impersonation_tests.py b/tests/core/test_impersonation_tests.py index 8350e95a8f4fd..0683b619d60f4 100644 --- a/tests/core/test_impersonation_tests.py +++ b/tests/core/test_impersonation_tests.py @@ -32,8 +32,7 @@ from airflow.utils.db import add_default_pool_if_not_exists from airflow.utils.state import State from airflow.utils.timezone import datetime - -from dev.tests_common.test_utils import db +from tests_common.test_utils import db # The entire module into the quarantined mark, this might have unpredictable side effects to other tests # and should be moved into the isolated environment into the future. diff --git a/tests/core/test_logging_config.py b/tests/core/test_logging_config.py index a316130ecdabe..aeb6d36ced04f 100644 --- a/tests/core/test_logging_config.py +++ b/tests/core/test_logging_config.py @@ -29,8 +29,7 @@ import pytest from airflow.configuration import conf - -from dev.tests_common.test_utils.config import conf_vars +from tests_common.test_utils.config import conf_vars SETTINGS_FILE_VALID = """ LOGGING_CONFIG = { diff --git a/tests/core/test_otel_tracer.py b/tests/core/test_otel_tracer.py index b9612c49dae92..36ebb9f09ce07 100644 --- a/tests/core/test_otel_tracer.py +++ b/tests/core/test_otel_tracer.py @@ -26,8 +26,7 @@ from airflow.traces import TRACEPARENT, TRACESTATE, otel_tracer, utils from airflow.traces.tracer import Trace - -from dev.tests_common.test_utils.config import env_vars +from tests_common.test_utils.config import env_vars @pytest.fixture diff --git a/tests/core/test_sentry.py b/tests/core/test_sentry.py index c67b49980aae2..972e45dbba247 100644 --- a/tests/core/test_sentry.py +++ b/tests/core/test_sentry.py @@ -30,8 +30,7 @@ from airflow.utils import timezone from airflow.utils.module_loading import import_string from airflow.utils.state import State - -from dev.tests_common.test_utils.config import conf_vars +from tests_common.test_utils.config import conf_vars EXECUTION_DATE = timezone.utcnow() SCHEDULE_INTERVAL = datetime.timedelta(days=1) diff --git a/tests/core/test_settings.py b/tests/core/test_settings.py index 619d64630029d..27b40ad7d1fae 100644 --- a/tests/core/test_settings.py +++ b/tests/core/test_settings.py @@ -33,8 +33,7 @@ from airflow.exceptions import AirflowClusterPolicyViolation, AirflowConfigException from airflow.settings import _ENABLE_AIP_44, TracebackSession, is_usage_data_collection_enabled from airflow.utils.session import create_session - -from dev.tests_common.test_utils.config import conf_vars +from tests_common.test_utils.config import conf_vars SETTINGS_FILE_POLICY = """ def test_policy(task_instance): diff --git a/tests/core/test_sqlalchemy_config.py b/tests/core/test_sqlalchemy_config.py index 5fed8745fd085..99fb90d3ba2e3 100644 --- a/tests/core/test_sqlalchemy_config.py +++ b/tests/core/test_sqlalchemy_config.py @@ -25,8 +25,7 @@ from airflow import settings from airflow.api_internal.internal_api_call import InternalApiConfig from airflow.exceptions import AirflowConfigException - -from dev.tests_common.test_utils.config import conf_vars +from tests_common.test_utils.config import conf_vars SQL_ALCHEMY_CONNECT_ARGS = {"test": 43503, "dict": {"is": 1, "supported": "too"}} diff --git a/tests/core/test_stats.py b/tests/core/test_stats.py index 9a218010a189e..e2969204d1d32 100644 --- a/tests/core/test_stats.py +++ b/tests/core/test_stats.py @@ -36,8 +36,7 @@ PatternAllowListValidator, PatternBlockListValidator, ) - -from dev.tests_common.test_utils.config import conf_vars +from tests_common.test_utils.config import conf_vars class CustomStatsd(statsd.StatsClient): diff --git a/tests/dag_processing/test_job_runner.py b/tests/dag_processing/test_job_runner.py index 81b94dd18b18a..e16ec2d1dddcc 100644 --- a/tests/dag_processing/test_job_runner.py +++ b/tests/dag_processing/test_job_runner.py @@ -58,12 +58,9 @@ from airflow.utils import timezone from airflow.utils.net import get_hostname from airflow.utils.session import create_session -from tests.core.test_logging_config import SETTINGS_FILE_VALID, settings_context -from tests.models import TEST_DAGS_FOLDER - -from dev.tests_common.test_utils.compat import ParseImportError -from dev.tests_common.test_utils.config import conf_vars -from dev.tests_common.test_utils.db import ( +from tests_common.test_utils.compat import ParseImportError +from tests_common.test_utils.config import conf_vars +from tests_common.test_utils.db import ( clear_db_callbacks, clear_db_dags, clear_db_import_errors, @@ -71,6 +68,9 @@ clear_db_serialized_dags, ) +from tests.core.test_logging_config import SETTINGS_FILE_VALID, settings_context +from tests.models import TEST_DAGS_FOLDER + pytestmark = pytest.mark.db_test logger = logging.getLogger(__name__) diff --git a/tests/dag_processing/test_processor.py b/tests/dag_processing/test_processor.py index c3a0f5a26e329..40412a131b40b 100644 --- a/tests/dag_processing/test_processor.py +++ b/tests/dag_processing/test_processor.py @@ -39,11 +39,10 @@ from airflow.utils.session import create_session from airflow.utils.state import State from airflow.utils.types import DagRunType - -from dev.tests_common.test_utils.asserts import assert_queries_count -from dev.tests_common.test_utils.compat import AIRFLOW_V_3_0_PLUS, ParseImportError -from dev.tests_common.test_utils.config import conf_vars, env_vars -from dev.tests_common.test_utils.db import ( +from tests_common.test_utils.asserts import assert_queries_count +from tests_common.test_utils.compat import AIRFLOW_V_3_0_PLUS, ParseImportError +from tests_common.test_utils.config import conf_vars, env_vars +from tests_common.test_utils.db import ( clear_db_dags, clear_db_import_errors, clear_db_jobs, @@ -51,7 +50,7 @@ clear_db_runs, clear_db_serialized_dags, ) -from dev.tests_common.test_utils.mock_executor import MockExecutor +from tests_common.test_utils.mock_executor import MockExecutor if AIRFLOW_V_3_0_PLUS: from airflow.utils.types import DagRunTriggeredByType diff --git a/tests/dags/test_external_task_sensor_check_existense.py b/tests/dags/test_external_task_sensor_check_existense.py index 05bd82c509f98..9de992c073b91 100644 --- a/tests/dags/test_external_task_sensor_check_existense.py +++ b/tests/dags/test_external_task_sensor_check_existense.py @@ -20,6 +20,7 @@ from airflow.models.dag import DAG from airflow.operators.empty import EmptyOperator from airflow.sensors.external_task import ExternalTaskSensor + from tests.models import DEFAULT_DATE with DAG( diff --git a/tests/dags/test_miscellaneous.py b/tests/dags/test_miscellaneous.py index b08e61e3bbddc..e54ae1b458491 100644 --- a/tests/dags/test_miscellaneous.py +++ b/tests/dags/test_miscellaneous.py @@ -23,8 +23,7 @@ from airflow.models.dag import DAG from airflow.operators.empty import EmptyOperator - -from dev.tests_common.test_utils.compat import BashOperator +from tests_common.test_utils.compat import BashOperator args = { "owner": "airflow", diff --git a/tests/dags/test_sensor.py b/tests/dags/test_sensor.py index 7c96160402663..5dc8fbe020901 100644 --- a/tests/dags/test_sensor.py +++ b/tests/dags/test_sensor.py @@ -21,8 +21,7 @@ from airflow.decorators import task from airflow.models.dag import DAG from airflow.utils import timezone - -from dev.tests_common.test_utils.compat import DateTimeSensor +from tests_common.test_utils.compat import DateTimeSensor with DAG( dag_id="test_sensor", start_date=datetime.datetime(2022, 1, 1), catchup=False, schedule="@once" diff --git a/tests/decorators/test_bash.py b/tests/decorators/test_bash.py index da79fb4cca0fb..dd2ce6223c53c 100644 --- a/tests/decorators/test_bash.py +++ b/tests/decorators/test_bash.py @@ -29,8 +29,7 @@ from airflow.models.renderedtifields import RenderedTaskInstanceFields from airflow.utils import timezone from airflow.utils.types import NOTSET - -from dev.tests_common.test_utils.db import clear_db_dags, clear_db_runs, clear_rendered_ti_fields +from tests_common.test_utils.db import clear_db_dags, clear_db_runs, clear_rendered_ti_fields DEFAULT_DATE = timezone.datetime(2023, 1, 1) diff --git a/tests/decorators/test_mapped.py b/tests/decorators/test_mapped.py index 2d3747b5f34ef..9bd59f03be7e1 100644 --- a/tests/decorators/test_mapped.py +++ b/tests/decorators/test_mapped.py @@ -22,6 +22,7 @@ from airflow.decorators import task from airflow.models.dag import DAG from airflow.utils.task_group import TaskGroup + from tests.models import DEFAULT_DATE diff --git a/tests/decorators/test_python.py b/tests/decorators/test_python.py index d34fbbf552b30..4307b29afb48b 100644 --- a/tests/decorators/test_python.py +++ b/tests/decorators/test_python.py @@ -39,9 +39,9 @@ from airflow.utils.trigger_rule import TriggerRule from airflow.utils.types import DagRunType from airflow.utils.xcom import XCOM_RETURN_KEY -from tests.operators.test_python import BasePythonTest +from tests_common.test_utils.compat import AIRFLOW_V_3_0_PLUS -from dev.tests_common.test_utils.compat import AIRFLOW_V_3_0_PLUS +from tests.operators.test_python import BasePythonTest if AIRFLOW_V_3_0_PLUS: from airflow.utils.types import DagRunTriggeredByType diff --git a/tests/executors/test_executor_loader.py b/tests/executors/test_executor_loader.py index d9bf81dd3116d..d6e783282d0ef 100644 --- a/tests/executors/test_executor_loader.py +++ b/tests/executors/test_executor_loader.py @@ -29,8 +29,7 @@ from airflow.executors.local_executor import LocalExecutor from airflow.providers.amazon.aws.executors.ecs.ecs_executor import AwsEcsExecutor from airflow.providers.celery.executors.celery_executor import CeleryExecutor - -from dev.tests_common.test_utils.config import conf_vars +from tests_common.test_utils.config import conf_vars pytestmark = pytest.mark.skip_if_database_isolation_mode diff --git a/tests/integration/cli/commands/test_celery_command.py b/tests/integration/cli/commands/test_celery_command.py index 186addedb1164..bb6c097578a6c 100644 --- a/tests/integration/cli/commands/test_celery_command.py +++ b/tests/integration/cli/commands/test_celery_command.py @@ -25,8 +25,7 @@ from airflow.cli import cli_parser from airflow.cli.commands import celery_command from airflow.executors import executor_loader - -from dev.tests_common.test_utils.config import conf_vars +from tests_common.test_utils.config import conf_vars @pytest.mark.integration("celery") diff --git a/tests/integration/executors/test_celery_executor.py b/tests/integration/executors/test_celery_executor.py index 169d3e91356c9..4dd5e2bdc94d9 100644 --- a/tests/integration/executors/test_celery_executor.py +++ b/tests/integration/executors/test_celery_executor.py @@ -45,8 +45,7 @@ from airflow.models.taskinstancekey import TaskInstanceKey from airflow.providers.standard.operators.bash import BashOperator from airflow.utils.state import State, TaskInstanceState - -from dev.tests_common.test_utils import db +from tests_common.test_utils import db logger = logging.getLogger(__name__) diff --git a/tests/integration/security/test_kerberos.py b/tests/integration/security/test_kerberos.py index d16b8bc332c7d..7267b69442d78 100644 --- a/tests/integration/security/test_kerberos.py +++ b/tests/integration/security/test_kerberos.py @@ -26,8 +26,7 @@ from airflow.security import kerberos from airflow.security.kerberos import renew_from_kt - -from dev.tests_common.test_utils.config import conf_vars +from tests_common.test_utils.config import conf_vars @pytest.mark.integration("kerberos") diff --git a/tests/jobs/test_base_job.py b/tests/jobs/test_base_job.py index 20079f4f235e5..058539868f1c0 100644 --- a/tests/jobs/test_base_job.py +++ b/tests/jobs/test_base_job.py @@ -32,11 +32,11 @@ from airflow.utils import timezone from airflow.utils.session import create_session from airflow.utils.state import State +from tests_common.test_utils.config import conf_vars + from tests.listeners import lifecycle_listener from tests.utils.test_helpers import MockJobRunner, SchedulerJobRunner, TriggererJobRunner -from dev.tests_common.test_utils.config import conf_vars - if TYPE_CHECKING: from airflow.serialization.pydantic.job import JobPydantic diff --git a/tests/jobs/test_local_task_job.py b/tests/jobs/test_local_task_job.py index 577fddd84d2b7..7d99c593511dd 100644 --- a/tests/jobs/test_local_task_job.py +++ b/tests/jobs/test_local_task_job.py @@ -52,12 +52,11 @@ from airflow.utils.state import State from airflow.utils.timeout import timeout from airflow.utils.types import DagRunType - -from dev.tests_common.test_utils import db -from dev.tests_common.test_utils.asserts import assert_queries_count -from dev.tests_common.test_utils.compat import AIRFLOW_V_3_0_PLUS -from dev.tests_common.test_utils.config import conf_vars -from dev.tests_common.test_utils.mock_executor import MockExecutor +from tests_common.test_utils import db +from tests_common.test_utils.asserts import assert_queries_count +from tests_common.test_utils.compat import AIRFLOW_V_3_0_PLUS +from tests_common.test_utils.config import conf_vars +from tests_common.test_utils.mock_executor import MockExecutor if AIRFLOW_V_3_0_PLUS: from airflow.utils.types import DagRunTriggeredByType diff --git a/tests/jobs/test_scheduler_job.py b/tests/jobs/test_scheduler_job.py index 7eae1639d0e1b..f47f4497d5aab 100644 --- a/tests/jobs/test_scheduler_job.py +++ b/tests/jobs/test_scheduler_job.py @@ -69,15 +69,10 @@ from airflow.utils.session import create_session, provide_session from airflow.utils.state import DagRunState, JobState, State, TaskInstanceState from airflow.utils.types import DagRunType -from tests.listeners import dag_listener -from tests.listeners.test_listeners import get_listener_manager -from tests.models import TEST_DAGS_FOLDER -from tests.utils.test_timezone import UTC - -from dev.tests_common.test_utils.asserts import assert_queries_count -from dev.tests_common.test_utils.compat import AIRFLOW_V_3_0_PLUS -from dev.tests_common.test_utils.config import conf_vars, env_vars -from dev.tests_common.test_utils.db import ( +from tests_common.test_utils.asserts import assert_queries_count +from tests_common.test_utils.compat import AIRFLOW_V_3_0_PLUS +from tests_common.test_utils.config import conf_vars, env_vars +from tests_common.test_utils.db import ( clear_db_assets, clear_db_backfills, clear_db_dags, @@ -89,8 +84,13 @@ clear_db_sla_miss, set_default_pool_slots, ) -from dev.tests_common.test_utils.mock_executor import MockExecutor -from dev.tests_common.test_utils.mock_operators import CustomOperator +from tests_common.test_utils.mock_executor import MockExecutor +from tests_common.test_utils.mock_operators import CustomOperator + +from tests.listeners import dag_listener +from tests.listeners.test_listeners import get_listener_manager +from tests.models import TEST_DAGS_FOLDER +from tests.utils.test_timezone import UTC if AIRFLOW_V_3_0_PLUS: from airflow.utils.types import DagRunTriggeredByType diff --git a/tests/jobs/test_triggerer_job.py b/tests/jobs/test_triggerer_job.py index da8405e197317..3987aa86438fa 100644 --- a/tests/jobs/test_triggerer_job.py +++ b/tests/jobs/test_triggerer_job.py @@ -46,9 +46,9 @@ from airflow.utils.session import create_session from airflow.utils.state import State, TaskInstanceState from airflow.utils.types import DagRunType -from tests.core.test_logging_config import reset_logging +from tests_common.test_utils.db import clear_db_dags, clear_db_runs -from dev.tests_common.test_utils.db import clear_db_dags, clear_db_runs +from tests.core.test_logging_config import reset_logging pytestmark = pytest.mark.db_test diff --git a/tests/jobs/test_triggerer_job_logging.py b/tests/jobs/test_triggerer_job_logging.py index 4f39047f050ee..fcca727641512 100644 --- a/tests/jobs/test_triggerer_job_logging.py +++ b/tests/jobs/test_triggerer_job_logging.py @@ -30,8 +30,7 @@ from airflow.utils.log.file_task_handler import FileTaskHandler from airflow.utils.log.logging_mixin import RedirectStdHandler from airflow.utils.log.trigger_handler import DropTriggerLogsFilter, TriggererHandlerWrapper - -from dev.tests_common.test_utils.config import conf_vars +from tests_common.test_utils.config import conf_vars def non_pytest_handlers(val): diff --git a/tests/lineage/test_hook.py b/tests/lineage/test_hook.py index 3fbbfaa021ffa..6287b39fc8fa1 100644 --- a/tests/lineage/test_hook.py +++ b/tests/lineage/test_hook.py @@ -33,8 +33,7 @@ NoOpCollector, get_hook_lineage_collector, ) - -from dev.tests_common.test_utils.mock_plugins import mock_plugin_manager +from tests_common.test_utils.mock_plugins import mock_plugin_manager class TestHookLineageCollector: diff --git a/tests/lineage/test_lineage.py b/tests/lineage/test_lineage.py index ac42b2ee7f814..bd5b2ebe0fc03 100644 --- a/tests/lineage/test_lineage.py +++ b/tests/lineage/test_lineage.py @@ -30,8 +30,7 @@ from airflow.utils import timezone from airflow.utils.context import Context from airflow.utils.types import DagRunType - -from dev.tests_common.test_utils.config import conf_vars +from tests_common.test_utils.config import conf_vars pytestmark = pytest.mark.db_test diff --git a/tests/listeners/class_listener.py b/tests/listeners/class_listener.py index 2b9cefa178d7d..5ae71733bf3bd 100644 --- a/tests/listeners/class_listener.py +++ b/tests/listeners/class_listener.py @@ -19,8 +19,7 @@ from airflow.listeners import hookimpl from airflow.utils.state import DagRunState, TaskInstanceState - -from dev.tests_common.test_utils.compat import AIRFLOW_V_2_10_PLUS +from tests_common.test_utils.compat import AIRFLOW_V_2_10_PLUS if AIRFLOW_V_2_10_PLUS: diff --git a/tests/listeners/test_asset_listener.py b/tests/listeners/test_asset_listener.py index bb93acd8a0fff..a075b87a7f3d2 100644 --- a/tests/listeners/test_asset_listener.py +++ b/tests/listeners/test_asset_listener.py @@ -23,6 +23,7 @@ from airflow.models.asset import AssetModel from airflow.operators.empty import EmptyOperator from airflow.utils.session import provide_session + from tests.listeners import asset_listener diff --git a/tests/listeners/test_dag_import_error_listener.py b/tests/listeners/test_dag_import_error_listener.py index 886044d27b44e..52a6103dc5bbd 100644 --- a/tests/listeners/test_dag_import_error_listener.py +++ b/tests/listeners/test_dag_import_error_listener.py @@ -31,10 +31,8 @@ from airflow.models import DagModel from airflow.models.errors import ParseImportError from airflow.utils import timezone -from tests.listeners import dag_import_error_listener - -from dev.tests_common.test_utils.config import conf_vars, env_vars -from dev.tests_common.test_utils.db import ( +from tests_common.test_utils.config import conf_vars, env_vars +from tests_common.test_utils.db import ( clear_db_dags, clear_db_import_errors, clear_db_jobs, @@ -43,7 +41,9 @@ clear_db_serialized_dags, clear_db_sla_miss, ) -from dev.tests_common.test_utils.mock_executor import MockExecutor +from tests_common.test_utils.mock_executor import MockExecutor + +from tests.listeners import dag_import_error_listener pytestmark = pytest.mark.db_test diff --git a/tests/listeners/test_listeners.py b/tests/listeners/test_listeners.py index 29ec25a9a8d2a..025e84f1cd696 100644 --- a/tests/listeners/test_listeners.py +++ b/tests/listeners/test_listeners.py @@ -29,6 +29,7 @@ from airflow.utils import timezone from airflow.utils.session import provide_session from airflow.utils.state import DagRunState, TaskInstanceState + from tests.listeners import ( class_listener, full_listener, diff --git a/tests/models/test_backfill.py b/tests/models/test_backfill.py index 06c41cadd8cc3..fafcca478c397 100644 --- a/tests/models/test_backfill.py +++ b/tests/models/test_backfill.py @@ -33,8 +33,7 @@ ) from airflow.operators.python import PythonOperator from airflow.utils.state import DagRunState - -from dev.tests_common.test_utils.db import ( +from tests_common.test_utils.db import ( clear_db_backfills, clear_db_dags, clear_db_runs, diff --git a/tests/models/test_base.py b/tests/models/test_base.py index 27eeba2912f52..2a58dc05009f3 100644 --- a/tests/models/test_base.py +++ b/tests/models/test_base.py @@ -19,8 +19,7 @@ import pytest from airflow.models.base import get_id_collation_args - -from dev.tests_common.test_utils.config import conf_vars +from tests_common.test_utils.config import conf_vars pytestmark = [pytest.mark.db_test, pytest.mark.skip_if_database_isolation_mode] diff --git a/tests/models/test_baseoperator.py b/tests/models/test_baseoperator.py index 999529e14a997..b9edc2b56f5a4 100644 --- a/tests/models/test_baseoperator.py +++ b/tests/models/test_baseoperator.py @@ -49,9 +49,9 @@ from airflow.utils.template import literal from airflow.utils.trigger_rule import TriggerRule from airflow.utils.types import DagRunType -from tests.models import DEFAULT_DATE +from tests_common.test_utils.mock_operators import DeprecatedOperator, MockOperator -from dev.tests_common.test_utils.mock_operators import DeprecatedOperator, MockOperator +from tests.models import DEFAULT_DATE if TYPE_CHECKING: from airflow.utils.context import Context diff --git a/tests/models/test_cleartasks.py b/tests/models/test_cleartasks.py index 810453053dd0c..a58e308b01861 100644 --- a/tests/models/test_cleartasks.py +++ b/tests/models/test_cleartasks.py @@ -34,10 +34,10 @@ from airflow.utils.session import create_session from airflow.utils.state import DagRunState, State, TaskInstanceState from airflow.utils.types import DagRunType -from tests.models import DEFAULT_DATE +from tests_common.test_utils import db +from tests_common.test_utils.compat import AIRFLOW_V_3_0_PLUS -from dev.tests_common.test_utils import db -from dev.tests_common.test_utils.compat import AIRFLOW_V_3_0_PLUS +from tests.models import DEFAULT_DATE if AIRFLOW_V_3_0_PLUS: from airflow.utils.types import DagRunTriggeredByType diff --git a/tests/models/test_dag.py b/tests/models/test_dag.py index 67dc699fc3c8b..0fe22ccf77fe3 100644 --- a/tests/models/test_dag.py +++ b/tests/models/test_dag.py @@ -90,6 +90,19 @@ from airflow.utils.trigger_rule import TriggerRule from airflow.utils.types import DagRunType from airflow.utils.weight_rule import WeightRule +from tests_common.test_utils.asserts import assert_queries_count +from tests_common.test_utils.compat import AIRFLOW_V_3_0_PLUS +from tests_common.test_utils.config import conf_vars +from tests_common.test_utils.db import ( + clear_db_assets, + clear_db_dags, + clear_db_runs, + clear_db_serialized_dags, +) +from tests_common.test_utils.mapping import expand_mapped_task +from tests_common.test_utils.mock_plugins import mock_plugin_manager +from tests_common.test_utils.timetables import cron_timetable, delta_timetable + from tests.models import DEFAULT_DATE from tests.plugins.priority_weight_strategy import ( FactorPriorityWeightStrategy, @@ -98,19 +111,6 @@ TestPriorityWeightStrategyPlugin, ) -from dev.tests_common.test_utils.asserts import assert_queries_count -from dev.tests_common.test_utils.compat import AIRFLOW_V_3_0_PLUS -from dev.tests_common.test_utils.config import conf_vars -from dev.tests_common.test_utils.db import ( - clear_db_assets, - clear_db_dags, - clear_db_runs, - clear_db_serialized_dags, -) -from dev.tests_common.test_utils.mapping import expand_mapped_task -from dev.tests_common.test_utils.mock_plugins import mock_plugin_manager -from dev.tests_common.test_utils.timetables import cron_timetable, delta_timetable - if AIRFLOW_V_3_0_PLUS: from airflow.utils.types import DagRunTriggeredByType diff --git a/tests/models/test_dagbag.py b/tests/models/test_dagbag.py index 0b477cc24c636..0973da449ef38 100644 --- a/tests/models/test_dagbag.py +++ b/tests/models/test_dagbag.py @@ -44,13 +44,13 @@ from airflow.utils.dates import timezone as tz from airflow.utils.session import create_session from airflow.www.security_appless import ApplessAirflowSecurityManager +from tests_common.test_utils import db +from tests_common.test_utils.asserts import assert_queries_count +from tests_common.test_utils.config import conf_vars + from tests import cluster_policies from tests.models import TEST_DAGS_FOLDER -from dev.tests_common.test_utils import db -from dev.tests_common.test_utils.asserts import assert_queries_count -from dev.tests_common.test_utils.config import conf_vars - pytestmark = pytest.mark.db_test example_dags_folder = pathlib.Path(airflow.example_dags.__path__[0]) # type: ignore[attr-defined] diff --git a/tests/models/test_dagcode.py b/tests/models/test_dagcode.py index 0bc105cfaf42c..f0cec513c09d3 100644 --- a/tests/models/test_dagcode.py +++ b/tests/models/test_dagcode.py @@ -30,8 +30,7 @@ # To move it to a shared module. from airflow.utils.file import open_maybe_zipped from airflow.utils.session import create_session - -from dev.tests_common.test_utils.db import clear_db_dag_code +from tests_common.test_utils.db import clear_db_dag_code pytestmark = [pytest.mark.db_test, pytest.mark.skip_if_database_isolation_mode] diff --git a/tests/models/test_dagrun.py b/tests/models/test_dagrun.py index 46773232f77fe..587d514cf807e 100644 --- a/tests/models/test_dagrun.py +++ b/tests/models/test_dagrun.py @@ -46,12 +46,12 @@ from airflow.utils.state import DagRunState, State, TaskInstanceState from airflow.utils.trigger_rule import TriggerRule from airflow.utils.types import DagRunType -from tests.models import DEFAULT_DATE as _DEFAULT_DATE +from tests_common.test_utils import db +from tests_common.test_utils.compat import AIRFLOW_V_3_0_PLUS +from tests_common.test_utils.config import conf_vars +from tests_common.test_utils.mock_operators import MockOperator -from dev.tests_common.test_utils import db -from dev.tests_common.test_utils.compat import AIRFLOW_V_3_0_PLUS -from dev.tests_common.test_utils.config import conf_vars -from dev.tests_common.test_utils.mock_operators import MockOperator +from tests.models import DEFAULT_DATE as _DEFAULT_DATE if AIRFLOW_V_3_0_PLUS: from airflow.utils.types import DagRunTriggeredByType diff --git a/tests/models/test_dagwarning.py b/tests/models/test_dagwarning.py index 9b98e0c31d74d..95d12c005e4bb 100644 --- a/tests/models/test_dagwarning.py +++ b/tests/models/test_dagwarning.py @@ -25,8 +25,7 @@ from airflow.models import DagModel from airflow.models.dagwarning import DagWarning - -from dev.tests_common.test_utils.db import clear_db_dags +from tests_common.test_utils.db import clear_db_dags pytestmark = [pytest.mark.db_test, pytest.mark.skip_if_database_isolation_mode] diff --git a/tests/models/test_mappedoperator.py b/tests/models/test_mappedoperator.py index 927dbfd73a563..7180421a90bd6 100644 --- a/tests/models/test_mappedoperator.py +++ b/tests/models/test_mappedoperator.py @@ -41,15 +41,15 @@ from airflow.utils.task_instance_session import set_current_task_instance_session from airflow.utils.trigger_rule import TriggerRule from airflow.utils.xcom import XCOM_RETURN_KEY -from tests.models import DEFAULT_DATE - -from dev.tests_common.test_utils.mapping import expand_mapped_task -from dev.tests_common.test_utils.mock_operators import ( +from tests_common.test_utils.mapping import expand_mapped_task +from tests_common.test_utils.mock_operators import ( MockOperator, MockOperatorWithNestedFields, NestedFields, ) +from tests.models import DEFAULT_DATE + pytestmark = pytest.mark.db_test if TYPE_CHECKING: diff --git a/tests/models/test_param.py b/tests/models/test_param.py index 2d324478deefe..7ade5bd21cebf 100644 --- a/tests/models/test_param.py +++ b/tests/models/test_param.py @@ -26,8 +26,7 @@ from airflow.serialization.serialized_objects import BaseSerialization from airflow.utils import timezone from airflow.utils.types import DagRunType - -from dev.tests_common.test_utils.db import clear_db_dags, clear_db_runs, clear_db_xcom +from tests_common.test_utils.db import clear_db_dags, clear_db_runs, clear_db_xcom class TestParam: diff --git a/tests/models/test_pool.py b/tests/models/test_pool.py index 22852261671ce..698899be002e4 100644 --- a/tests/models/test_pool.py +++ b/tests/models/test_pool.py @@ -27,8 +27,7 @@ from airflow.utils import timezone from airflow.utils.session import create_session from airflow.utils.state import State - -from dev.tests_common.test_utils.db import ( +from tests_common.test_utils.db import ( clear_db_dags, clear_db_pools, clear_db_runs, diff --git a/tests/models/test_renderedtifields.py b/tests/models/test_renderedtifields.py index 6ff87b28a89b6..6d160164ecff8 100644 --- a/tests/models/test_renderedtifields.py +++ b/tests/models/test_renderedtifields.py @@ -37,9 +37,8 @@ from airflow.providers.standard.operators.bash import BashOperator from airflow.utils.task_instance_session import set_current_task_instance_session from airflow.utils.timezone import datetime - -from dev.tests_common.test_utils.asserts import assert_queries_count -from dev.tests_common.test_utils.db import clear_db_dags, clear_db_runs, clear_rendered_ti_fields +from tests_common.test_utils.asserts import assert_queries_count +from tests_common.test_utils.db import clear_db_dags, clear_db_runs, clear_rendered_ti_fields pytestmark = pytest.mark.db_test diff --git a/tests/models/test_serialized_dag.py b/tests/models/test_serialized_dag.py index 5e6714feda373..2ed2d5090a2d6 100644 --- a/tests/models/test_serialized_dag.py +++ b/tests/models/test_serialized_dag.py @@ -36,9 +36,8 @@ from airflow.settings import json from airflow.utils.hashlib_wrapper import md5 from airflow.utils.session import create_session - -from dev.tests_common.test_utils import db -from dev.tests_common.test_utils.asserts import assert_queries_count +from tests_common.test_utils import db +from tests_common.test_utils.asserts import assert_queries_count pytestmark = pytest.mark.db_test diff --git a/tests/models/test_skipmixin.py b/tests/models/test_skipmixin.py index 0f2406c5737c5..e15f5521d1cd0 100644 --- a/tests/models/test_skipmixin.py +++ b/tests/models/test_skipmixin.py @@ -31,8 +31,7 @@ from airflow.utils import timezone from airflow.utils.state import State from airflow.utils.types import DagRunType - -from dev.tests_common.test_utils.db import clear_db_dags, clear_db_runs +from tests_common.test_utils.db import clear_db_dags, clear_db_runs pytestmark = pytest.mark.db_test diff --git a/tests/models/test_taskinstance.py b/tests/models/test_taskinstance.py index 03566dca30bc9..5753f51fcd2f8 100644 --- a/tests/models/test_taskinstance.py +++ b/tests/models/test_taskinstance.py @@ -98,13 +98,13 @@ from airflow.utils.task_instance_session import set_current_task_instance_session from airflow.utils.types import DagRunType from airflow.utils.xcom import XCOM_RETURN_KEY -from tests.models import DEFAULT_DATE, TEST_DAGS_FOLDER +from tests_common.test_utils import db +from tests_common.test_utils.compat import AIRFLOW_V_3_0_PLUS +from tests_common.test_utils.config import conf_vars +from tests_common.test_utils.db import clear_db_connections, clear_db_runs +from tests_common.test_utils.mock_operators import MockOperator -from dev.tests_common.test_utils import db -from dev.tests_common.test_utils.compat import AIRFLOW_V_3_0_PLUS -from dev.tests_common.test_utils.config import conf_vars -from dev.tests_common.test_utils.db import clear_db_connections, clear_db_runs -from dev.tests_common.test_utils.mock_operators import MockOperator +from tests.models import DEFAULT_DATE, TEST_DAGS_FOLDER if AIRFLOW_V_3_0_PLUS: from airflow.utils.types import DagRunTriggeredByType diff --git a/tests/models/test_timestamp.py b/tests/models/test_timestamp.py index 4888c2fdac268..6bf9b9b768a60 100644 --- a/tests/models/test_timestamp.py +++ b/tests/models/test_timestamp.py @@ -25,8 +25,7 @@ from airflow.utils import timezone from airflow.utils.session import provide_session from airflow.utils.state import State - -from dev.tests_common.test_utils.db import clear_db_dags, clear_db_logs, clear_db_runs +from tests_common.test_utils.db import clear_db_dags, clear_db_logs, clear_db_runs pytestmark = pytest.mark.db_test diff --git a/tests/models/test_trigger.py b/tests/models/test_trigger.py index b44e4b9f6e881..8a9c21c685bbb 100644 --- a/tests/models/test_trigger.py +++ b/tests/models/test_trigger.py @@ -42,8 +42,7 @@ from airflow.utils.session import create_session from airflow.utils.state import State from airflow.utils.xcom import XCOM_RETURN_KEY - -from dev.tests_common.test_utils.config import conf_vars +from tests_common.test_utils.config import conf_vars pytestmark = pytest.mark.db_test diff --git a/tests/models/test_variable.py b/tests/models/test_variable.py index dfe448092c842..29a5c94d9ae0d 100644 --- a/tests/models/test_variable.py +++ b/tests/models/test_variable.py @@ -27,9 +27,8 @@ from airflow.models import Variable, crypto, variable from airflow.secrets.cache import SecretCache from airflow.secrets.metastore import MetastoreBackend - -from dev.tests_common.test_utils import db -from dev.tests_common.test_utils.config import conf_vars +from tests_common.test_utils import db +from tests_common.test_utils.config import conf_vars pytestmark = pytest.mark.db_test diff --git a/tests/models/test_xcom.py b/tests/models/test_xcom.py index 17ea5fa4ff114..ee47ac79fab1e 100644 --- a/tests/models/test_xcom.py +++ b/tests/models/test_xcom.py @@ -35,9 +35,8 @@ from airflow.utils import timezone from airflow.utils.session import create_session from airflow.utils.xcom import XCOM_RETURN_KEY - -from dev.tests_common.test_utils.config import conf_vars -from dev.tests_common.test_utils.db import is_db_isolation_mode +from tests_common.test_utils.config import conf_vars +from tests_common.test_utils.db import is_db_isolation_mode pytestmark = pytest.mark.db_test diff --git a/tests/models/test_xcom_arg.py b/tests/models/test_xcom_arg.py index fbdd500661d22..11613bcfec6b9 100644 --- a/tests/models/test_xcom_arg.py +++ b/tests/models/test_xcom_arg.py @@ -22,8 +22,7 @@ from airflow.operators.python import PythonOperator from airflow.providers.standard.operators.bash import BashOperator from airflow.utils.types import NOTSET - -from dev.tests_common.test_utils.db import clear_db_dags, clear_db_runs +from tests_common.test_utils.db import clear_db_dags, clear_db_runs pytestmark = pytest.mark.db_test diff --git a/tests/operators/test_branch_operator.py b/tests/operators/test_branch_operator.py index 8943bf580e50a..3442ff0a7e5e1 100644 --- a/tests/operators/test_branch_operator.py +++ b/tests/operators/test_branch_operator.py @@ -28,8 +28,7 @@ from airflow.utils.state import State from airflow.utils.task_group import TaskGroup from airflow.utils.types import DagRunType - -from dev.tests_common.test_utils.compat import AIRFLOW_V_3_0_PLUS +from tests_common.test_utils.compat import AIRFLOW_V_3_0_PLUS if AIRFLOW_V_3_0_PLUS: from airflow.utils.types import DagRunTriggeredByType diff --git a/tests/operators/test_email.py b/tests/operators/test_email.py index c86e0f94f6145..8ef2634aad4d3 100644 --- a/tests/operators/test_email.py +++ b/tests/operators/test_email.py @@ -24,8 +24,7 @@ from airflow.operators.email import EmailOperator from airflow.utils import timezone - -from dev.tests_common.test_utils.config import conf_vars +from tests_common.test_utils.config import conf_vars pytestmark = pytest.mark.db_test diff --git a/tests/operators/test_latest_only_operator.py b/tests/operators/test_latest_only_operator.py index 78fabc4ca922f..57bc2d27c1a3f 100644 --- a/tests/operators/test_latest_only_operator.py +++ b/tests/operators/test_latest_only_operator.py @@ -30,9 +30,8 @@ from airflow.utils.state import State from airflow.utils.trigger_rule import TriggerRule from airflow.utils.types import DagRunType - -from dev.tests_common.test_utils.compat import AIRFLOW_V_3_0_PLUS -from dev.tests_common.test_utils.db import clear_db_runs, clear_db_xcom +from tests_common.test_utils.compat import AIRFLOW_V_3_0_PLUS +from tests_common.test_utils.db import clear_db_runs, clear_db_xcom if AIRFLOW_V_3_0_PLUS: from airflow.utils.types import DagRunTriggeredByType diff --git a/tests/operators/test_python.py b/tests/operators/test_python.py index 3dd8f506ee986..5c91362723c1e 100644 --- a/tests/operators/test_python.py +++ b/tests/operators/test_python.py @@ -68,10 +68,9 @@ from airflow.utils.state import DagRunState, State, TaskInstanceState from airflow.utils.trigger_rule import TriggerRule from airflow.utils.types import NOTSET, DagRunType - -from dev.tests_common.test_utils import AIRFLOW_MAIN_FOLDER -from dev.tests_common.test_utils.compat import AIRFLOW_V_3_0_PLUS -from dev.tests_common.test_utils.db import clear_db_runs +from tests_common.test_utils import AIRFLOW_MAIN_FOLDER +from tests_common.test_utils.compat import AIRFLOW_V_3_0_PLUS +from tests_common.test_utils.db import clear_db_runs if AIRFLOW_V_3_0_PLUS: from airflow.utils.types import DagRunTriggeredByType diff --git a/tests/plugins/test_plugin.py b/tests/plugins/test_plugin.py index fd474766d41ea..8751d75cd20fd 100644 --- a/tests/plugins/test_plugin.py +++ b/tests/plugins/test_plugin.py @@ -33,10 +33,7 @@ from airflow.task.priority_strategy import PriorityWeightStrategy from airflow.ti_deps.deps.base_ti_dep import BaseTIDep from airflow.timetables.interval import CronDataIntervalTimetable -from tests.listeners import empty_listener -from tests.listeners.class_listener import ClassBasedListener - -from dev.tests_common.test_utils.mock_operators import ( +from tests_common.test_utils.mock_operators import ( AirflowLink, AirflowLink2, CustomBaseIndexOpLink, @@ -45,6 +42,9 @@ GoogleLink, ) +from tests.listeners import empty_listener +from tests.listeners.class_listener import ClassBasedListener + # Will show up under airflow.hooks.test_plugin.PluginHook class PluginHook(BaseHook): diff --git a/tests/plugins/test_plugins_manager.py b/tests/plugins/test_plugins_manager.py index 1c54c3ebb195c..0c742dd70c67d 100644 --- a/tests/plugins/test_plugins_manager.py +++ b/tests/plugins/test_plugins_manager.py @@ -33,9 +33,8 @@ from airflow.plugins_manager import AirflowPlugin from airflow.utils.module_loading import qualname from airflow.www import app as application - -from dev.tests_common.test_utils.config import conf_vars -from dev.tests_common.test_utils.mock_plugins import mock_plugin_manager +from tests_common.test_utils.config import conf_vars +from tests_common.test_utils.mock_plugins import mock_plugin_manager pytestmark = pytest.mark.db_test diff --git a/tests/secrets/test_cache.py b/tests/secrets/test_cache.py index 40ab4aa290df5..86ed57688f34d 100644 --- a/tests/secrets/test_cache.py +++ b/tests/secrets/test_cache.py @@ -22,8 +22,7 @@ import pytest from airflow.secrets.cache import SecretCache - -from dev.tests_common.test_utils.config import conf_vars +from tests_common.test_utils.config import conf_vars def test_cache_disabled_by_default(): diff --git a/tests/security/test_kerberos.py b/tests/security/test_kerberos.py index 2b661fe9a1478..9f15c0296894c 100644 --- a/tests/security/test_kerberos.py +++ b/tests/security/test_kerberos.py @@ -25,8 +25,7 @@ from airflow.security import kerberos from airflow.security.kerberos import get_kerberos_principle, renew_from_kt - -from dev.tests_common.test_utils.config import conf_vars +from tests_common.test_utils.config import conf_vars pytestmark = pytest.mark.db_test diff --git a/tests/sensors/test_base.py b/tests/sensors/test_base.py index 8a3b2b5c5c0fa..f89cee879f9b8 100644 --- a/tests/sensors/test_base.py +++ b/tests/sensors/test_base.py @@ -57,8 +57,7 @@ from airflow.utils.session import create_session from airflow.utils.state import State from airflow.utils.timezone import datetime - -from dev.tests_common.test_utils import db +from tests_common.test_utils import db pytestmark = pytest.mark.db_test diff --git a/tests/sensors/test_external_task_sensor.py b/tests/sensors/test_external_task_sensor.py index f1739e6b84418..2f17bfd38d133 100644 --- a/tests/sensors/test_external_task_sensor.py +++ b/tests/sensors/test_external_task_sensor.py @@ -51,11 +51,11 @@ from airflow.utils.task_group import TaskGroup from airflow.utils.timezone import datetime from airflow.utils.types import DagRunType -from tests.models import TEST_DAGS_FOLDER +from tests_common.test_utils.compat import AIRFLOW_V_3_0_PLUS +from tests_common.test_utils.db import clear_db_runs +from tests_common.test_utils.mock_operators import MockOperator -from dev.tests_common.test_utils.compat import AIRFLOW_V_3_0_PLUS -from dev.tests_common.test_utils.db import clear_db_runs -from dev.tests_common.test_utils.mock_operators import MockOperator +from tests.models import TEST_DAGS_FOLDER if AIRFLOW_V_3_0_PLUS: from airflow.utils.types import DagRunTriggeredByType diff --git a/tests/sensors/test_python.py b/tests/sensors/test_python.py index 60814620b3b99..0a898b339108c 100644 --- a/tests/sensors/test_python.py +++ b/tests/sensors/test_python.py @@ -25,6 +25,7 @@ from airflow.exceptions import AirflowSensorTimeout from airflow.sensors.base import PokeReturnValue from airflow.sensors.python import PythonSensor + from tests.operators.test_python import BasePythonTest pytestmark = pytest.mark.db_test diff --git a/tests/serialization/test_dag_serialization.py b/tests/serialization/test_dag_serialization.py index 35f5e196a2222..da6723800d54a 100644 --- a/tests/serialization/test_dag_serialization.py +++ b/tests/serialization/test_dag_serialization.py @@ -80,10 +80,9 @@ from airflow.utils.operator_resources import Resources from airflow.utils.task_group import TaskGroup from airflow.utils.xcom import XCOM_RETURN_KEY - -from dev.tests_common.test_utils.compat import BaseOperatorLink -from dev.tests_common.test_utils.mock_operators import AirflowLink2, CustomOperator, GoogleLink, MockOperator -from dev.tests_common.test_utils.timetables import ( +from tests_common.test_utils.compat import BaseOperatorLink +from tests_common.test_utils.mock_operators import AirflowLink2, CustomOperator, GoogleLink, MockOperator +from tests_common.test_utils.timetables import ( CustomSerializationTimetable, cron_timetable, delta_timetable, @@ -190,9 +189,7 @@ "max_retry_delay": 600.0, "downstream_task_ids": [], "_is_empty": False, - "_operator_extra_links": [ - {"dev.tests_common.test_utils.mock_operators.CustomOpLink": {}} - ], + "_operator_extra_links": [{"tests_common.test_utils.mock_operators.CustomOpLink": {}}], "ui_color": "#fff", "ui_fgcolor": "#000", "template_ext": [], @@ -200,7 +197,7 @@ "template_fields_renderers": {}, "_task_type": "CustomOperator", "_operator_name": "@custom", - "_task_module": "dev.tests_common.test_utils.mock_operators", + "_task_module": "tests_common.test_utils.mock_operators", "pool": "default_pool", "is_setup": False, "is_teardown": False, @@ -240,7 +237,7 @@ ) CUSTOM_TIMETABLE_SERIALIZED = { - "__type": "dev.tests_common.test_utils.timetables.CustomSerializationTimetable", + "__type": "tests_common.test_utils.timetables.CustomSerializationTimetable", "__var": {"value": "foo"}, } @@ -373,7 +370,7 @@ def timetable_plugin(monkeypatch): monkeypatch.setattr( plugins_manager, "timetable_classes", - {"dev.tests_common.test_utils.timetables.CustomSerializationTimetable": CustomSerializationTimetable}, + {"tests_common.test_utils.timetables.CustomSerializationTimetable": CustomSerializationTimetable}, ) @@ -469,7 +466,7 @@ def test_dag_serialization_unregistered_custom_timetable(self): message = ( "Failed to serialize DAG 'simple_dag': Timetable class " - "'dev.tests_common.test_utils.timetables.CustomSerializationTimetable' " + "'tests_common.test_utils.timetables.CustomSerializationTimetable' " "is not registered or " "you have a top level database access that disrupted the session. " "Please check the airflow best practices documentation." @@ -834,7 +831,7 @@ def test_deserialization_timetable_unregistered(self): SerializedDAG.from_dict(serialized) message = ( "Timetable class " - "'dev.tests_common.test_utils.timetables.CustomSerializationTimetable' " + "'tests_common.test_utils.timetables.CustomSerializationTimetable' " "is not registered or " "you have a top level database access that disrupted the session. " "Please check the airflow best practices documentation." @@ -986,15 +983,15 @@ def test_task_params_roundtrip(self, val, expected_val): [ pytest.param( "true", - [{"dev.tests_common.test_utils.mock_operators.CustomOpLink": {}}], + [{"tests_common.test_utils.mock_operators.CustomOpLink": {}}], {"Google Custom": "http://google.com/custom_base_link?search=true"}, id="non-indexed-link", ), pytest.param( ["echo", "true"], [ - {"dev.tests_common.test_utils.mock_operators.CustomBaseIndexOpLink": {"index": 0}}, - {"dev.tests_common.test_utils.mock_operators.CustomBaseIndexOpLink": {"index": 1}}, + {"tests_common.test_utils.mock_operators.CustomBaseIndexOpLink": {"index": 0}}, + {"tests_common.test_utils.mock_operators.CustomBaseIndexOpLink": {"index": 1}}, ], { "BigQuery Console #1": "https://console.cloud.google.com/bigquery?j=echo", @@ -1297,7 +1294,7 @@ def test_operator_deserialize_old_names(self): "template_fields": ["bash_command"], "template_fields_renderers": {}, "_task_type": "CustomOperator", - "_task_module": "dev.tests_common.test_utils.mock_operators", + "_task_module": "tests_common.test_utils.mock_operators", "pool": "default_pool", "ui_color": "#fff", "ui_fgcolor": "#000", @@ -2354,7 +2351,7 @@ def test_operator_expand_xcomarg_serde(): "_is_empty": False, "_is_mapped": True, "_needs_expansion": True, - "_task_module": "dev.tests_common.test_utils.mock_operators", + "_task_module": "tests_common.test_utils.mock_operators", "_task_type": "MockOperator", "downstream_task_ids": [], "expand_input": { @@ -2409,7 +2406,7 @@ def test_operator_expand_kwargs_literal_serde(strict): "_is_empty": False, "_is_mapped": True, "_needs_expansion": True, - "_task_module": "dev.tests_common.test_utils.mock_operators", + "_task_module": "tests_common.test_utils.mock_operators", "_task_type": "MockOperator", "downstream_task_ids": [], "expand_input": { @@ -2464,7 +2461,7 @@ def test_operator_expand_kwargs_xcomarg_serde(strict): "_is_empty": False, "_is_mapped": True, "_needs_expansion": True, - "_task_module": "dev.tests_common.test_utils.mock_operators", + "_task_module": "tests_common.test_utils.mock_operators", "_task_type": "MockOperator", "downstream_task_ids": [], "expand_input": { @@ -2827,7 +2824,7 @@ def operator_extra_links(self): "_disallow_kwargs_override": False, "_expand_input_attr": "expand_input", "downstream_task_ids": [], - "_operator_extra_links": [{"dev.tests_common.test_utils.mock_operators.AirflowLink2": {}}], + "_operator_extra_links": [{"tests_common.test_utils.mock_operators.AirflowLink2": {}}], "ui_color": "#fff", "ui_fgcolor": "#000", "template_ext": [], diff --git a/tests/serialization/test_pydantic_models.py b/tests/serialization/test_pydantic_models.py index 423dc41a38068..6ecf9c8d5d90d 100644 --- a/tests/serialization/test_pydantic_models.py +++ b/tests/serialization/test_pydantic_models.py @@ -44,9 +44,9 @@ from airflow.utils import timezone from airflow.utils.state import State from airflow.utils.types import AttributeRemoved, DagRunType -from tests.models import DEFAULT_DATE +from tests_common.test_utils.compat import AIRFLOW_V_3_0_PLUS -from dev.tests_common.test_utils.compat import AIRFLOW_V_3_0_PLUS +from tests.models import DEFAULT_DATE if AIRFLOW_V_3_0_PLUS: from airflow.utils.types import DagRunTriggeredByType diff --git a/tests/serialization/test_serde.py b/tests/serialization/test_serde.py index 5c915839c6422..829195476c3d6 100644 --- a/tests/serialization/test_serde.py +++ b/tests/serialization/test_serde.py @@ -43,8 +43,7 @@ serialize, ) from airflow.utils.module_loading import import_string, iter_namespace, qualname - -from dev.tests_common.test_utils.config import conf_vars +from tests_common.test_utils.config import conf_vars @pytest.fixture diff --git a/tests/serialization/test_serialized_objects.py b/tests/serialization/test_serialized_objects.py index 67fdceeaf08d1..5d35278d89bfc 100644 --- a/tests/serialization/test_serialized_objects.py +++ b/tests/serialization/test_serialized_objects.py @@ -67,6 +67,7 @@ from airflow.utils.state import DagRunState, State from airflow.utils.task_group import TaskGroup from airflow.utils.types import DagRunType + from tests import REPO_ROOT @@ -471,8 +472,7 @@ def test_all_pydantic_models_round_trip(): @pytest.mark.db_test def test_serialized_mapped_operator_unmap(dag_maker): from airflow.serialization.serialized_objects import SerializedDAG - - from dev.tests_common.test_utils.mock_operators import MockOperator + from tests_common.test_utils.mock_operators import MockOperator with dag_maker(dag_id="dag") as dag: MockOperator(task_id="task1", arg1="x") diff --git a/tests/system/core/example_external_task_child_deferrable.py b/tests/system/core/example_external_task_child_deferrable.py index 4e8eca3b15eb2..1da360b57b56d 100644 --- a/tests/system/core/example_external_task_child_deferrable.py +++ b/tests/system/core/example_external_task_child_deferrable.py @@ -34,7 +34,7 @@ ) -from dev.tests_common.test_utils.system_tests import get_test_run +from tests_common.test_utils.system_tests import get_test_run # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/tests/system/core/example_external_task_parent_deferrable.py b/tests/system/core/example_external_task_parent_deferrable.py index 1a64f7e98ae8a..62bb1afc18b2e 100644 --- a/tests/system/core/example_external_task_parent_deferrable.py +++ b/tests/system/core/example_external_task_parent_deferrable.py @@ -57,14 +57,14 @@ start >> [trigger_child_task, external_task_sensor] >> end - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "teardown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run +from tests_common.test_utils.system_tests import get_test_run # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/tests/system/example_empty.py b/tests/system/example_empty.py index de316a11eee77..d2d362012c633 100644 --- a/tests/system/example_empty.py +++ b/tests/system/example_empty.py @@ -35,14 +35,14 @@ chain(task) - from dev.tests_common.test_utils.watcher import watcher + from tests_common.test_utils.watcher import watcher # This test needs watcher in order to properly mark success/failure # when "tearDown" task with trigger rule is part of the DAG list(dag.tasks) >> watcher() -from dev.tests_common.test_utils.system_tests import get_test_run # noqa: E402 +from tests_common.test_utils.system_tests import get_test_run # noqa: E402 # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest) test_run = get_test_run(dag) diff --git a/tests/task/task_runner/test_standard_task_runner.py b/tests/task/task_runner/test_standard_task_runner.py index 55e3d34192d60..7e1c80c8f8d6f 100644 --- a/tests/task/task_runner/test_standard_task_runner.py +++ b/tests/task/task_runner/test_standard_task_runner.py @@ -40,12 +40,12 @@ from airflow.utils.platform import getuser from airflow.utils.state import State from airflow.utils.timeout import timeout +from tests_common.test_utils.compat import AIRFLOW_V_3_0_PLUS +from tests_common.test_utils.db import clear_db_runs + from tests.listeners import xcom_listener from tests.listeners.file_write_listener import FileWriteListener -from dev.tests_common.test_utils.compat import AIRFLOW_V_3_0_PLUS -from dev.tests_common.test_utils.db import clear_db_runs - if AIRFLOW_V_3_0_PLUS: from airflow.utils.types import DagRunTriggeredByType diff --git a/tests/ti_deps/deps/test_pool_slots_available_dep.py b/tests/ti_deps/deps/test_pool_slots_available_dep.py index d7fc33aa41bf8..1cf2d1d2072fe 100644 --- a/tests/ti_deps/deps/test_pool_slots_available_dep.py +++ b/tests/ti_deps/deps/test_pool_slots_available_dep.py @@ -26,8 +26,7 @@ from airflow.ti_deps.deps.pool_slots_available_dep import PoolSlotsAvailableDep from airflow.utils.session import create_session from airflow.utils.state import TaskInstanceState - -from dev.tests_common.test_utils import db +from tests_common.test_utils import db pytestmark = [pytest.mark.db_test, pytest.mark.skip_if_database_isolation_mode] diff --git a/tests/ti_deps/deps/test_prev_dagrun_dep.py b/tests/ti_deps/deps/test_prev_dagrun_dep.py index 638f4b69d7e92..bb7ea047ac651 100644 --- a/tests/ti_deps/deps/test_prev_dagrun_dep.py +++ b/tests/ti_deps/deps/test_prev_dagrun_dep.py @@ -29,9 +29,8 @@ from airflow.utils.state import DagRunState, TaskInstanceState from airflow.utils.timezone import convert_to_utc, datetime from airflow.utils.types import DagRunType - -from dev.tests_common.test_utils.compat import AIRFLOW_V_3_0_PLUS -from dev.tests_common.test_utils.db import clear_db_runs +from tests_common.test_utils.compat import AIRFLOW_V_3_0_PLUS +from tests_common.test_utils.db import clear_db_runs if AIRFLOW_V_3_0_PLUS: from airflow.utils.types import DagRunTriggeredByType diff --git a/tests/ti_deps/deps/test_ready_to_reschedule_dep.py b/tests/ti_deps/deps/test_ready_to_reschedule_dep.py index d137d43bbf38d..02b291797956f 100644 --- a/tests/ti_deps/deps/test_ready_to_reschedule_dep.py +++ b/tests/ti_deps/deps/test_ready_to_reschedule_dep.py @@ -30,8 +30,7 @@ from airflow.utils import timezone from airflow.utils.session import create_session from airflow.utils.state import State - -from dev.tests_common.test_utils import db +from tests_common.test_utils import db pytestmark = [pytest.mark.db_test, pytest.mark.skip_if_database_isolation_mode] diff --git a/tests/utils/log/test_log_reader.py b/tests/utils/log/test_log_reader.py index 53e702efd8a8e..95d8471a3a35b 100644 --- a/tests/utils/log/test_log_reader.py +++ b/tests/utils/log/test_log_reader.py @@ -38,9 +38,8 @@ from airflow.utils.log.logging_mixin import ExternalLoggingMixin from airflow.utils.state import TaskInstanceState from airflow.utils.types import DagRunType - -from dev.tests_common.test_utils.config import conf_vars -from dev.tests_common.test_utils.db import clear_db_dags, clear_db_runs +from tests_common.test_utils.config import conf_vars +from tests_common.test_utils.db import clear_db_dags, clear_db_runs pytestmark = [pytest.mark.db_test, pytest.mark.skip_if_database_isolation_mode] diff --git a/tests/utils/log/test_secrets_masker.py b/tests/utils/log/test_secrets_masker.py index f3fed73675cce..ffe37fbfc4955 100644 --- a/tests/utils/log/test_secrets_masker.py +++ b/tests/utils/log/test_secrets_masker.py @@ -38,8 +38,7 @@ should_hide_value_for_key, ) from airflow.utils.state import DagRunState, JobState, State, TaskInstanceState - -from dev.tests_common.test_utils.config import conf_vars +from tests_common.test_utils.config import conf_vars pytestmark = pytest.mark.enable_redact p = "password" diff --git a/tests/utils/log/test_task_context_logger.py b/tests/utils/log/test_task_context_logger.py index 3a08947ede091..5d326a240f45e 100644 --- a/tests/utils/log/test_task_context_logger.py +++ b/tests/utils/log/test_task_context_logger.py @@ -24,9 +24,8 @@ from airflow.models.taskinstancekey import TaskInstanceKey from airflow.utils.log.task_context_logger import TaskContextLogger - -from dev.tests_common.test_utils.compat import AIRFLOW_V_3_0_PLUS -from dev.tests_common.test_utils.config import conf_vars +from tests_common.test_utils.compat import AIRFLOW_V_3_0_PLUS +from tests_common.test_utils.config import conf_vars if AIRFLOW_V_3_0_PLUS: from airflow.utils.types import DagRunTriggeredByType diff --git a/tests/utils/test_dag_cycle.py b/tests/utils/test_dag_cycle.py index 1cf607fd8ee50..55937f1382e38 100644 --- a/tests/utils/test_dag_cycle.py +++ b/tests/utils/test_dag_cycle.py @@ -24,6 +24,7 @@ from airflow.utils.dag_cycle_tester import check_cycle from airflow.utils.edgemodifier import Label from airflow.utils.task_group import TaskGroup + from tests.models import DEFAULT_DATE diff --git a/tests/utils/test_db.py b/tests/utils/test_db.py index 0f3a56a5d1c8d..dcfcd16421527 100644 --- a/tests/utils/test_db.py +++ b/tests/utils/test_db.py @@ -50,8 +50,7 @@ upgradedb, ) from airflow.utils.db_manager import RunDBManager - -from dev.tests_common.test_utils.config import conf_vars +from tests_common.test_utils.config import conf_vars pytestmark = [pytest.mark.db_test, pytest.mark.skip_if_database_isolation_mode] diff --git a/tests/utils/test_db_cleanup.py b/tests/utils/test_db_cleanup.py index 3b5a3b2227231..c7533827d805d 100644 --- a/tests/utils/test_db_cleanup.py +++ b/tests/utils/test_db_cleanup.py @@ -48,8 +48,7 @@ run_cleanup, ) from airflow.utils.session import create_session - -from dev.tests_common.test_utils.db import ( +from tests_common.test_utils.db import ( clear_db_assets, clear_db_dags, clear_db_runs, diff --git a/tests/utils/test_db_manager.py b/tests/utils/test_db_manager.py index 975ea65499aae..001d89e1d4c59 100644 --- a/tests/utils/test_db_manager.py +++ b/tests/utils/test_db_manager.py @@ -25,8 +25,7 @@ from airflow.models import Base from airflow.utils.db import downgrade, initdb from airflow.utils.db_manager import BaseDBManager, RunDBManager - -from dev.tests_common.test_utils.config import conf_vars +from tests_common.test_utils.config import conf_vars pytestmark = [pytest.mark.db_test] diff --git a/tests/utils/test_dot_renderer.py b/tests/utils/test_dot_renderer.py index d1521ca6e0f69..718d2d03b0832 100644 --- a/tests/utils/test_dot_renderer.py +++ b/tests/utils/test_dot_renderer.py @@ -29,9 +29,8 @@ from airflow.utils import dot_renderer, timezone from airflow.utils.state import State from airflow.utils.task_group import TaskGroup - -from dev.tests_common.test_utils.compat import BashOperator -from dev.tests_common.test_utils.db import clear_db_dags +from tests_common.test_utils.compat import BashOperator +from tests_common.test_utils.db import clear_db_dags START_DATE = timezone.utcnow() diff --git a/tests/utils/test_email.py b/tests/utils/test_email.py index b47dcbc87585a..ac90c20ef6a75 100644 --- a/tests/utils/test_email.py +++ b/tests/utils/test_email.py @@ -29,8 +29,7 @@ from airflow.configuration import conf from airflow.utils import email - -from dev.tests_common.test_utils.config import conf_vars +from tests_common.test_utils.config import conf_vars EMAILS = ["test1@example.com", "test2@example.com"] diff --git a/tests/utils/test_file.py b/tests/utils/test_file.py index 9424b90a92cf4..a7ca4bd5575f7 100644 --- a/tests/utils/test_file.py +++ b/tests/utils/test_file.py @@ -26,9 +26,9 @@ from airflow.utils import file as file_utils from airflow.utils.file import correct_maybe_zipped, find_path_from_directory, open_maybe_zipped -from tests.models import TEST_DAGS_FOLDER +from tests_common.test_utils.config import conf_vars -from dev.tests_common.test_utils.config import conf_vars +from tests.models import TEST_DAGS_FOLDER def might_contain_dag(file_path: str, zip_file: zipfile.ZipFile | None = None): diff --git a/tests/utils/test_helpers.py b/tests/utils/test_helpers.py index 0b0046b1ba082..ded59b999f8bf 100644 --- a/tests/utils/test_helpers.py +++ b/tests/utils/test_helpers.py @@ -37,9 +37,8 @@ validate_key, ) from airflow.utils.types import NOTSET - -from dev.tests_common.test_utils.config import conf_vars -from dev.tests_common.test_utils.db import clear_db_dags, clear_db_runs +from tests_common.test_utils.config import conf_vars +from tests_common.test_utils.db import clear_db_dags, clear_db_runs if TYPE_CHECKING: from airflow.jobs.job import Job diff --git a/tests/utils/test_log_handlers.py b/tests/utils/test_log_handlers.py index 4be3564567ebd..c1135d8fe4a18 100644 --- a/tests/utils/test_log_handlers.py +++ b/tests/utils/test_log_handlers.py @@ -54,9 +54,8 @@ from airflow.utils.state import State, TaskInstanceState from airflow.utils.timezone import datetime from airflow.utils.types import DagRunType - -from dev.tests_common.test_utils.compat import AIRFLOW_V_3_0_PLUS -from dev.tests_common.test_utils.config import conf_vars +from tests_common.test_utils.compat import AIRFLOW_V_3_0_PLUS +from tests_common.test_utils.config import conf_vars if AIRFLOW_V_3_0_PLUS: from airflow.utils.types import DagRunTriggeredByType diff --git a/tests/utils/test_net.py b/tests/utils/test_net.py index 60823911b8b03..50fdd207dec3f 100644 --- a/tests/utils/test_net.py +++ b/tests/utils/test_net.py @@ -24,8 +24,7 @@ from airflow.exceptions import AirflowConfigException from airflow.utils import net - -from dev.tests_common.test_utils.config import conf_vars +from tests_common.test_utils.config import conf_vars def get_hostname(): diff --git a/tests/utils/test_serve_logs.py b/tests/utils/test_serve_logs.py index 8d41202be2545..0c6fb8d87591e 100644 --- a/tests/utils/test_serve_logs.py +++ b/tests/utils/test_serve_logs.py @@ -28,8 +28,7 @@ from airflow.utils import timezone from airflow.utils.jwt_signer import JWTSigner from airflow.utils.serve_logs import create_app - -from dev.tests_common.test_utils.config import conf_vars +from tests_common.test_utils.config import conf_vars if TYPE_CHECKING: from flask.testing import FlaskClient diff --git a/tests/utils/test_sqlalchemy.py b/tests/utils/test_sqlalchemy.py index 42717a4fb045a..49e4db42788a6 100644 --- a/tests/utils/test_sqlalchemy.py +++ b/tests/utils/test_sqlalchemy.py @@ -42,8 +42,7 @@ ) from airflow.utils.state import State from airflow.utils.timezone import utcnow - -from dev.tests_common.test_utils.compat import AIRFLOW_V_3_0_PLUS +from tests_common.test_utils.compat import AIRFLOW_V_3_0_PLUS if AIRFLOW_V_3_0_PLUS: from airflow.utils.types import DagRunTriggeredByType diff --git a/tests/utils/test_state.py b/tests/utils/test_state.py index 6447477ef589b..12d857ee1999e 100644 --- a/tests/utils/test_state.py +++ b/tests/utils/test_state.py @@ -25,9 +25,9 @@ from airflow.utils.session import create_session from airflow.utils.state import DagRunState from airflow.utils.types import DagRunType -from tests.models import DEFAULT_DATE +from tests_common.test_utils.compat import AIRFLOW_V_3_0_PLUS -from dev.tests_common.test_utils.compat import AIRFLOW_V_3_0_PLUS +from tests.models import DEFAULT_DATE if AIRFLOW_V_3_0_PLUS: from airflow.utils.types import DagRunTriggeredByType diff --git a/tests/utils/test_task_group.py b/tests/utils/test_task_group.py index 6ea0fcdc36e13..6b2185bf791fc 100644 --- a/tests/utils/test_task_group.py +++ b/tests/utils/test_task_group.py @@ -38,9 +38,9 @@ from airflow.operators.python import PythonOperator from airflow.utils.dag_edges import dag_edges from airflow.utils.task_group import TASKGROUP_ARGS_EXPECTED_TYPES, TaskGroup, task_group_to_dict -from tests.models import DEFAULT_DATE +from tests_common.test_utils.compat import BashOperator -from dev.tests_common.test_utils.compat import BashOperator +from tests.models import DEFAULT_DATE def make_task(name, type_="classic"): @@ -1415,7 +1415,7 @@ def test_task_group_edge_modifier_chain(): def test_mapped_task_group_id_prefix_task_id(): - from dev.tests_common.test_utils.mock_operators import MockOperator + from tests_common.test_utils.mock_operators import MockOperator with DAG(dag_id="d", schedule=None, start_date=DEFAULT_DATE) as dag: t1 = MockOperator.partial(task_id="t1").expand(arg1=[]) diff --git a/tests/utils/test_task_handler_with_custom_formatter.py b/tests/utils/test_task_handler_with_custom_formatter.py index aee646d858b15..785cb34eaa013 100644 --- a/tests/utils/test_task_handler_with_custom_formatter.py +++ b/tests/utils/test_task_handler_with_custom_formatter.py @@ -28,10 +28,9 @@ from airflow.utils.state import DagRunState from airflow.utils.timezone import datetime from airflow.utils.types import DagRunType - -from dev.tests_common.test_utils.compat import AIRFLOW_V_3_0_PLUS -from dev.tests_common.test_utils.config import conf_vars -from dev.tests_common.test_utils.db import clear_db_runs +from tests_common.test_utils.compat import AIRFLOW_V_3_0_PLUS +from tests_common.test_utils.config import conf_vars +from tests_common.test_utils.db import clear_db_runs if AIRFLOW_V_3_0_PLUS: from airflow.utils.types import DagRunTriggeredByType diff --git a/tests/utils/test_types.py b/tests/utils/test_types.py index cb5849b20599a..d982730392076 100644 --- a/tests/utils/test_types.py +++ b/tests/utils/test_types.py @@ -25,9 +25,9 @@ from airflow.utils.session import create_session from airflow.utils.state import State from airflow.utils.types import DagRunType -from tests.models import DEFAULT_DATE +from tests_common.test_utils.compat import AIRFLOW_V_3_0_PLUS -from dev.tests_common.test_utils.compat import AIRFLOW_V_3_0_PLUS +from tests.models import DEFAULT_DATE if AIRFLOW_V_3_0_PLUS: from airflow.utils.types import DagRunTriggeredByType diff --git a/tests/www/test_app.py b/tests/www/test_app.py index 673abd371dfb5..20dd5eb05e7e0 100644 --- a/tests/www/test_app.py +++ b/tests/www/test_app.py @@ -29,9 +29,8 @@ from airflow.exceptions import AirflowConfigException from airflow.www import app as application - -from dev.tests_common.test_utils.config import conf_vars -from dev.tests_common.test_utils.decorators import dont_initialize_flask_app_submodules +from tests_common.test_utils.config import conf_vars +from tests_common.test_utils.decorators import dont_initialize_flask_app_submodules pytestmark = [pytest.mark.db_test, pytest.mark.skip_if_database_isolation_mode] diff --git a/tests/www/test_utils.py b/tests/www/test_utils.py index f8f0ae983382e..1ee0415b822a4 100644 --- a/tests/www/test_utils.py +++ b/tests/www/test_utils.py @@ -44,8 +44,7 @@ wrapped_markdown, ) from airflow.www.widgets import AirflowDateTimePickerROWidget, BS3TextAreaROWidget, BS3TextFieldROWidget - -from dev.tests_common.test_utils.compat import AIRFLOW_V_3_0_PLUS +from tests_common.test_utils.compat import AIRFLOW_V_3_0_PLUS if AIRFLOW_V_3_0_PLUS: from airflow.utils.types import DagRunTriggeredByType diff --git a/tests/www/views/conftest.py b/tests/www/views/conftest.py index faa1cc23a8d36..e5bf5f947ac3b 100644 --- a/tests/www/views/conftest.py +++ b/tests/www/views/conftest.py @@ -27,11 +27,10 @@ from airflow import settings from airflow.models import DagBag from airflow.www.app import create_app - -from dev.tests_common.test_utils.api_connexion_utils import delete_user -from dev.tests_common.test_utils.config import conf_vars -from dev.tests_common.test_utils.decorators import dont_initialize_flask_app_submodules -from dev.tests_common.test_utils.www import ( +from tests_common.test_utils.api_connexion_utils import delete_user +from tests_common.test_utils.config import conf_vars +from tests_common.test_utils.decorators import dont_initialize_flask_app_submodules +from tests_common.test_utils.www import ( client_with_login, client_without_login, client_without_login_as_admin, diff --git a/tests/www/views/test_anonymous_as_admin_role.py b/tests/www/views/test_anonymous_as_admin_role.py index 700f03f8e63c8..f881a35f95594 100644 --- a/tests/www/views/test_anonymous_as_admin_role.py +++ b/tests/www/views/test_anonymous_as_admin_role.py @@ -23,8 +23,7 @@ from airflow.models import Pool from airflow.utils.session import create_session - -from dev.tests_common.test_utils.www import check_content_in_response +from tests_common.test_utils.www import check_content_in_response pytestmark = pytest.mark.db_test diff --git a/tests/www/views/test_session.py b/tests/www/views/test_session.py index 009917606bda3..3bce5ebd9bf0d 100644 --- a/tests/www/views/test_session.py +++ b/tests/www/views/test_session.py @@ -22,9 +22,8 @@ from airflow.exceptions import AirflowConfigException from airflow.www import app - -from dev.tests_common.test_utils.config import conf_vars -from dev.tests_common.test_utils.decorators import dont_initialize_flask_app_submodules +from tests_common.test_utils.config import conf_vars +from tests_common.test_utils.decorators import dont_initialize_flask_app_submodules pytestmark = pytest.mark.db_test diff --git a/tests/www/views/test_views.py b/tests/www/views/test_views.py index bae022316c73d..46d2ea7b194f9 100644 --- a/tests/www/views/test_views.py +++ b/tests/www/views/test_views.py @@ -42,11 +42,10 @@ get_task_stats_from_query, get_value_from_path, ) - -from dev.tests_common.test_utils.compat import AIRFLOW_V_3_0_PLUS -from dev.tests_common.test_utils.config import conf_vars -from dev.tests_common.test_utils.mock_plugins import mock_plugin_manager -from dev.tests_common.test_utils.www import check_content_in_response, check_content_not_in_response +from tests_common.test_utils.compat import AIRFLOW_V_3_0_PLUS +from tests_common.test_utils.config import conf_vars +from tests_common.test_utils.mock_plugins import mock_plugin_manager +from tests_common.test_utils.www import check_content_in_response, check_content_not_in_response if AIRFLOW_V_3_0_PLUS: from airflow.utils.types import DagRunTriggeredByType @@ -330,8 +329,7 @@ def test_mark_task_instance_state(test_app): from airflow.utils.timezone import datetime from airflow.utils.types import DagRunType from airflow.www.views import Airflow - - from dev.tests_common.test_utils.db import clear_db_runs + from tests_common.test_utils.db import clear_db_runs clear_db_runs() start_date = datetime(2020, 1, 1) @@ -424,8 +422,7 @@ def test_mark_task_group_state(test_app): from airflow.utils.timezone import datetime from airflow.utils.types import DagRunType from airflow.www.views import Airflow - - from dev.tests_common.test_utils.db import clear_db_runs + from tests_common.test_utils.db import clear_db_runs clear_db_runs() start_date = datetime(2020, 1, 1) diff --git a/tests/www/views/test_views_acl.py b/tests/www/views/test_views_acl.py index 23fb26c18cf98..08e70b5727626 100644 --- a/tests/www/views/test_views_acl.py +++ b/tests/www/views/test_views_acl.py @@ -30,15 +30,15 @@ from airflow.utils.state import State from airflow.utils.types import DagRunType from airflow.www.views import FILTER_STATUS_COOKIE - -from dev.tests_common.test_utils.compat import AIRFLOW_V_3_0_PLUS -from dev.tests_common.test_utils.db import clear_db_runs -from dev.tests_common.test_utils.permissions import _resource_name -from dev.tests_common.test_utils.www import ( +from tests_common.test_utils.compat import AIRFLOW_V_3_0_PLUS +from tests_common.test_utils.db import clear_db_runs +from tests_common.test_utils.permissions import _resource_name +from tests_common.test_utils.www import ( check_content_in_response, check_content_not_in_response, client_with_login, ) + from providers.tests.fab.auth_manager.api_endpoints.api_connexion_utils import create_user_scope if AIRFLOW_V_3_0_PLUS: diff --git a/tests/www/views/test_views_base.py b/tests/www/views/test_views_base.py index 692f0301e2276..3254441c74da8 100644 --- a/tests/www/views/test_views_base.py +++ b/tests/www/views/test_views_base.py @@ -27,10 +27,9 @@ from airflow.utils import timezone from airflow.utils.session import create_session from airflow.www import app as application - -from dev.tests_common.test_utils.asserts import assert_queries_count -from dev.tests_common.test_utils.config import conf_vars -from dev.tests_common.test_utils.www import check_content_in_response, check_content_not_in_response +from tests_common.test_utils.asserts import assert_queries_count +from tests_common.test_utils.config import conf_vars +from tests_common.test_utils.www import check_content_in_response, check_content_not_in_response pytestmark = pytest.mark.db_test diff --git a/tests/www/views/test_views_cluster_activity.py b/tests/www/views/test_views_cluster_activity.py index 6b83de3c7682a..64063e069db69 100644 --- a/tests/www/views/test_views_cluster_activity.py +++ b/tests/www/views/test_views_cluster_activity.py @@ -26,8 +26,7 @@ from airflow.operators.empty import EmptyOperator from airflow.utils.state import DagRunState, TaskInstanceState from airflow.utils.types import DagRunType - -from dev.tests_common.test_utils.db import clear_db_runs +from tests_common.test_utils.db import clear_db_runs pytestmark = pytest.mark.db_test diff --git a/tests/www/views/test_views_configuration.py b/tests/www/views/test_views_configuration.py index 90ab9b7faa933..4bd1f2fc4c3c8 100644 --- a/tests/www/views/test_views_configuration.py +++ b/tests/www/views/test_views_configuration.py @@ -21,9 +21,8 @@ import pytest from airflow.configuration import conf - -from dev.tests_common.test_utils.config import conf_vars -from dev.tests_common.test_utils.www import check_content_in_response, check_content_not_in_response +from tests_common.test_utils.config import conf_vars +from tests_common.test_utils.www import check_content_in_response, check_content_not_in_response pytestmark = pytest.mark.db_test diff --git a/tests/www/views/test_views_connection.py b/tests/www/views/test_views_connection.py index 66e571780eb96..7b0229c315b96 100644 --- a/tests/www/views/test_views_connection.py +++ b/tests/www/views/test_views_connection.py @@ -27,8 +27,7 @@ from airflow.models import Connection from airflow.utils.session import create_session from airflow.www.views import ConnectionFormWidget, ConnectionModelView - -from dev.tests_common.test_utils.www import ( +from tests_common.test_utils.www import ( _check_last_log, _check_last_log_masked_connection, check_content_in_response, diff --git a/tests/www/views/test_views_custom_user_views.py b/tests/www/views/test_views_custom_user_views.py index 49ecc2c4f30b2..3c00242308b75 100644 --- a/tests/www/views/test_views_custom_user_views.py +++ b/tests/www/views/test_views_custom_user_views.py @@ -27,12 +27,12 @@ from airflow import settings from airflow.security import permissions from airflow.www import app as application - -from dev.tests_common.test_utils.www import ( +from tests_common.test_utils.www import ( check_content_in_response, check_content_not_in_response, client_with_login, ) + from providers.tests.fab.auth_manager.api_endpoints.api_connexion_utils import ( create_user, delete_role, diff --git a/tests/www/views/test_views_dagrun.py b/tests/www/views/test_views_dagrun.py index 3fb8eb02fb633..9a30e0a3511eb 100644 --- a/tests/www/views/test_views_dagrun.py +++ b/tests/www/views/test_views_dagrun.py @@ -24,19 +24,19 @@ from airflow.utils import timezone from airflow.utils.session import create_session from airflow.www.views import DagRunModelView -from tests.www.views.test_views_tasks import _get_appbuilder_pk_string - -from dev.tests_common.test_utils.compat import AIRFLOW_V_3_0_PLUS -from dev.tests_common.test_utils.www import ( +from tests_common.test_utils.compat import AIRFLOW_V_3_0_PLUS +from tests_common.test_utils.www import ( check_content_in_response, check_content_not_in_response, client_with_login, ) + from providers.tests.fab.auth_manager.api_endpoints.api_connexion_utils import ( create_user, delete_roles, delete_user, ) +from tests.www.views.test_views_tasks import _get_appbuilder_pk_string if AIRFLOW_V_3_0_PLUS: from airflow.utils.types import DagRunTriggeredByType diff --git a/tests/www/views/test_views_dataset.py b/tests/www/views/test_views_dataset.py index 899d64e9754ed..9d83715f3e210 100644 --- a/tests/www/views/test_views_dataset.py +++ b/tests/www/views/test_views_dataset.py @@ -24,9 +24,8 @@ from airflow.assets import Asset from airflow.models.asset import AssetEvent, AssetModel from airflow.operators.empty import EmptyOperator - -from dev.tests_common.test_utils.asserts import assert_queries_count -from dev.tests_common.test_utils.db import clear_db_assets +from tests_common.test_utils.asserts import assert_queries_count +from tests_common.test_utils.db import clear_db_assets pytestmark = pytest.mark.db_test diff --git a/tests/www/views/test_views_decorators.py b/tests/www/views/test_views_decorators.py index bdc402989fd0c..730fc55b4548b 100644 --- a/tests/www/views/test_views_decorators.py +++ b/tests/www/views/test_views_decorators.py @@ -23,10 +23,9 @@ from airflow.utils import timezone from airflow.utils.state import State from airflow.utils.types import DagRunType - -from dev.tests_common.test_utils.compat import AIRFLOW_V_3_0_PLUS -from dev.tests_common.test_utils.db import clear_db_runs, clear_db_variables -from dev.tests_common.test_utils.www import ( +from tests_common.test_utils.compat import AIRFLOW_V_3_0_PLUS +from tests_common.test_utils.db import clear_db_runs, clear_db_variables +from tests_common.test_utils.www import ( _check_last_log, _check_last_log_masked_variable, check_content_in_response, diff --git a/tests/www/views/test_views_extra_links.py b/tests/www/views/test_views_extra_links.py index fbc11bf51f337..bc06a09c8f95b 100644 --- a/tests/www/views/test_views_extra_links.py +++ b/tests/www/views/test_views_extra_links.py @@ -28,10 +28,13 @@ from airflow.utils import timezone from airflow.utils.state import DagRunState from airflow.utils.types import DagRunType - -from dev.tests_common.test_utils.compat import AIRFLOW_V_3_0_PLUS, BaseOperatorLink -from dev.tests_common.test_utils.db import clear_db_runs -from dev.tests_common.test_utils.mock_operators import AirflowLink, Dummy2TestOperator, Dummy3TestOperator +from tests_common.test_utils.compat import AIRFLOW_V_3_0_PLUS, BaseOperatorLink +from tests_common.test_utils.db import clear_db_runs +from tests_common.test_utils.mock_operators import ( + AirflowLink, + EmptyExtraLinkTestOperator, + EmptyNoExtraLinkTestOperator, +) if AIRFLOW_V_3_0_PLUS: from airflow.utils.types import DagRunTriggeredByType @@ -115,12 +118,12 @@ def task_1(dag): @pytest.fixture(scope="module", autouse=True) def task_2(dag): - return Dummy2TestOperator(task_id="some_dummy_task_2", dag=dag) + return EmptyExtraLinkTestOperator(task_id="some_dummy_task_2", dag=dag) @pytest.fixture(scope="module", autouse=True) def task_3(dag): - return Dummy3TestOperator(task_id="some_dummy_task_3", dag=dag) + return EmptyNoExtraLinkTestOperator(task_id="some_dummy_task_3", dag=dag) @pytest.fixture(scope="module", autouse=True) diff --git a/tests/www/views/test_views_grid.py b/tests/www/views/test_views_grid.py index 4f05f2a13456b..d896520422493 100644 --- a/tests/www/views/test_views_grid.py +++ b/tests/www/views/test_views_grid.py @@ -35,10 +35,9 @@ from airflow.utils.task_group import TaskGroup from airflow.utils.types import DagRunType from airflow.www.views import dag_to_grid - -from dev.tests_common.test_utils.asserts import assert_queries_count -from dev.tests_common.test_utils.db import clear_db_assets, clear_db_runs -from dev.tests_common.test_utils.mock_operators import MockOperator +from tests_common.test_utils.asserts import assert_queries_count +from tests_common.test_utils.db import clear_db_assets, clear_db_runs +from tests_common.test_utils.mock_operators import MockOperator pytestmark = pytest.mark.db_test diff --git a/tests/www/views/test_views_home.py b/tests/www/views/test_views_home.py index 4de032c58176e..b02099a668008 100644 --- a/tests/www/views/test_views_home.py +++ b/tests/www/views/test_views_home.py @@ -27,14 +27,14 @@ from airflow.utils.state import State from airflow.www.utils import UIAlert from airflow.www.views import FILTER_LASTRUN_COOKIE, FILTER_STATUS_COOKIE, FILTER_TAGS_COOKIE - -from dev.tests_common.test_utils.db import clear_db_dags, clear_db_import_errors, clear_db_serialized_dags -from dev.tests_common.test_utils.permissions import _resource_name -from dev.tests_common.test_utils.www import ( +from tests_common.test_utils.db import clear_db_dags, clear_db_import_errors, clear_db_serialized_dags +from tests_common.test_utils.permissions import _resource_name +from tests_common.test_utils.www import ( check_content_in_response, check_content_not_in_response, client_with_login, ) + from providers.tests.fab.auth_manager.api_endpoints.api_connexion_utils import create_user pytestmark = pytest.mark.db_test diff --git a/tests/www/views/test_views_log.py b/tests/www/views/test_views_log.py index c025ebcbbe8ed..b0fdf6a01d10c 100644 --- a/tests/www/views/test_views_log.py +++ b/tests/www/views/test_views_log.py @@ -40,12 +40,11 @@ from airflow.utils.state import DagRunState, TaskInstanceState from airflow.utils.types import DagRunType from airflow.www.app import create_app - -from dev.tests_common.test_utils.compat import AIRFLOW_V_3_0_PLUS -from dev.tests_common.test_utils.config import conf_vars -from dev.tests_common.test_utils.db import clear_db_dags, clear_db_runs -from dev.tests_common.test_utils.decorators import dont_initialize_flask_app_submodules -from dev.tests_common.test_utils.www import client_with_login +from tests_common.test_utils.compat import AIRFLOW_V_3_0_PLUS +from tests_common.test_utils.config import conf_vars +from tests_common.test_utils.db import clear_db_dags, clear_db_runs +from tests_common.test_utils.decorators import dont_initialize_flask_app_submodules +from tests_common.test_utils.www import client_with_login if AIRFLOW_V_3_0_PLUS: from airflow.utils.types import DagRunTriggeredByType diff --git a/tests/www/views/test_views_mount.py b/tests/www/views/test_views_mount.py index e58675439ec12..c20dc418d3a02 100644 --- a/tests/www/views/test_views_mount.py +++ b/tests/www/views/test_views_mount.py @@ -22,8 +22,7 @@ import werkzeug.wrappers from airflow.www.app import create_app - -from dev.tests_common.test_utils.config import conf_vars +from tests_common.test_utils.config import conf_vars pytestmark = pytest.mark.db_test diff --git a/tests/www/views/test_views_paused.py b/tests/www/views/test_views_paused.py index 551cdd180e078..59eee1868b70e 100644 --- a/tests/www/views/test_views_paused.py +++ b/tests/www/views/test_views_paused.py @@ -19,8 +19,7 @@ import pytest from airflow.models.log import Log - -from dev.tests_common.test_utils.db import clear_db_dags +from tests_common.test_utils.db import clear_db_dags pytestmark = pytest.mark.db_test diff --git a/tests/www/views/test_views_pool.py b/tests/www/views/test_views_pool.py index 9b9ddfaeeb79e..7b7b20d57c9cf 100644 --- a/tests/www/views/test_views_pool.py +++ b/tests/www/views/test_views_pool.py @@ -23,8 +23,7 @@ from airflow.models import Pool from airflow.utils.session import create_session - -from dev.tests_common.test_utils.www import check_content_in_response, check_content_not_in_response +from tests_common.test_utils.www import check_content_in_response, check_content_not_in_response pytestmark = pytest.mark.db_test diff --git a/tests/www/views/test_views_rate_limit.py b/tests/www/views/test_views_rate_limit.py index d843c8ed54b09..eee9fed8dde00 100644 --- a/tests/www/views/test_views_rate_limit.py +++ b/tests/www/views/test_views_rate_limit.py @@ -20,10 +20,9 @@ import pytest from airflow.www.app import create_app - -from dev.tests_common.test_utils.config import conf_vars -from dev.tests_common.test_utils.decorators import dont_initialize_flask_app_submodules -from dev.tests_common.test_utils.www import client_with_login +from tests_common.test_utils.config import conf_vars +from tests_common.test_utils.decorators import dont_initialize_flask_app_submodules +from tests_common.test_utils.www import client_with_login pytestmark = pytest.mark.db_test diff --git a/tests/www/views/test_views_rendered.py b/tests/www/views/test_views_rendered.py index 6d96cdc4d625f..c23c300416a1f 100644 --- a/tests/www/views/test_views_rendered.py +++ b/tests/www/views/test_views_rendered.py @@ -34,15 +34,14 @@ from airflow.utils.session import create_session from airflow.utils.state import DagRunState, TaskInstanceState from airflow.utils.types import DagRunType - -from dev.tests_common.test_utils.compat import AIRFLOW_V_3_0_PLUS, BashOperator -from dev.tests_common.test_utils.db import ( +from tests_common.test_utils.compat import AIRFLOW_V_3_0_PLUS, BashOperator +from tests_common.test_utils.db import ( clear_db_dags, clear_db_runs, clear_rendered_ti_fields, initial_db_init, ) -from dev.tests_common.test_utils.www import check_content_in_response, check_content_not_in_response +from tests_common.test_utils.www import check_content_in_response, check_content_not_in_response if AIRFLOW_V_3_0_PLUS: from airflow.utils.types import DagRunTriggeredByType diff --git a/tests/www/views/test_views_robots.py b/tests/www/views/test_views_robots.py index 41f963b3bf218..9f93ef5791f6f 100644 --- a/tests/www/views/test_views_robots.py +++ b/tests/www/views/test_views_robots.py @@ -18,7 +18,7 @@ import pytest -from dev.tests_common.test_utils.config import conf_vars +from tests_common.test_utils.config import conf_vars pytestmark = pytest.mark.db_test diff --git a/tests/www/views/test_views_task_norun.py b/tests/www/views/test_views_task_norun.py index 2ff6ff9d7cd67..4cb195461fccc 100644 --- a/tests/www/views/test_views_task_norun.py +++ b/tests/www/views/test_views_task_norun.py @@ -22,7 +22,7 @@ import pytest -from dev.tests_common.test_utils.db import clear_db_runs +from tests_common.test_utils.db import clear_db_runs pytestmark = pytest.mark.db_test diff --git a/tests/www/views/test_views_tasks.py b/tests/www/views/test_views_tasks.py index 4e9de5c00fc9c..b1a57ef290528 100644 --- a/tests/www/views/test_views_tasks.py +++ b/tests/www/views/test_views_tasks.py @@ -43,15 +43,15 @@ from airflow.utils.state import DagRunState, State from airflow.utils.types import DagRunType from airflow.www.views import TaskInstanceModelView, _safe_parse_datetime - -from dev.tests_common.test_utils.compat import AIRFLOW_V_3_0_PLUS, BashOperator -from dev.tests_common.test_utils.config import conf_vars -from dev.tests_common.test_utils.db import clear_db_runs, clear_db_xcom -from dev.tests_common.test_utils.www import ( +from tests_common.test_utils.compat import AIRFLOW_V_3_0_PLUS, BashOperator +from tests_common.test_utils.config import conf_vars +from tests_common.test_utils.db import clear_db_runs, clear_db_xcom +from tests_common.test_utils.www import ( check_content_in_response, check_content_not_in_response, client_with_login, ) + from providers.tests.fab.auth_manager.api_endpoints.api_connexion_utils import ( create_user, delete_roles, diff --git a/tests/www/views/test_views_trigger_dag.py b/tests/www/views/test_views_trigger_dag.py index d2c3817ede6db..f7e4d62599ea1 100644 --- a/tests/www/views/test_views_trigger_dag.py +++ b/tests/www/views/test_views_trigger_dag.py @@ -32,9 +32,9 @@ from airflow.utils.json import WebEncoder from airflow.utils.session import create_session from airflow.utils.types import DagRunType +from tests_common.test_utils.config import conf_vars +from tests_common.test_utils.www import check_content_in_response -from dev.tests_common.test_utils.config import conf_vars -from dev.tests_common.test_utils.www import check_content_in_response from providers.tests.fab.auth_manager.api_endpoints.api_connexion_utils import create_test_client pytestmark = pytest.mark.db_test diff --git a/tests/www/views/test_views_variable.py b/tests/www/views/test_views_variable.py index dae1f2e9b7315..2f1ec81fef1d6 100644 --- a/tests/www/views/test_views_variable.py +++ b/tests/www/views/test_views_variable.py @@ -25,13 +25,13 @@ from airflow.models import Variable from airflow.security import permissions from airflow.utils.session import create_session - -from dev.tests_common.test_utils.www import ( +from tests_common.test_utils.www import ( _check_last_log, check_content_in_response, check_content_not_in_response, client_with_login, ) + from providers.tests.fab.auth_manager.api_endpoints.api_connexion_utils import create_user pytestmark = pytest.mark.db_test diff --git a/dev/tests_common/__init__.py b/tests_common/__init__.py similarity index 100% rename from dev/tests_common/__init__.py rename to tests_common/__init__.py diff --git a/dev/tests_common/_internals/__init__.py b/tests_common/_internals/__init__.py similarity index 100% rename from dev/tests_common/_internals/__init__.py rename to tests_common/_internals/__init__.py diff --git a/dev/tests_common/_internals/capture_warnings.py b/tests_common/_internals/capture_warnings.py similarity index 99% rename from dev/tests_common/_internals/capture_warnings.py rename to tests_common/_internals/capture_warnings.py index 16b220989b89b..aaae4e54f0ce7 100644 --- a/dev/tests_common/_internals/capture_warnings.py +++ b/tests_common/_internals/capture_warnings.py @@ -179,7 +179,7 @@ def pytest_runtest_protocol(self, item: pytest.Item): @pytest.hookimpl(hookwrapper=True, trylast=True) def pytest_sessionfinish(self, session: pytest.Session, exitstatus: int): - """Save warning captures in the session finish on xdist worker node""" + """Save warning captures in the session finish on xdist worker node.""" with CapturedWarning.capture_warnings("config", self.root_path, None) as records: yield self.add_captured_warnings(records) @@ -206,7 +206,7 @@ def pytest_testnodedown(self, node, error): @staticmethod def sorted_groupby(it, grouping_key: Callable): - """Helper for sort and group by.""" + """Sort and group by items by the grouping_key.""" for group, grouped_data in itertools.groupby(sorted(it, key=grouping_key), key=grouping_key): yield group, list(grouped_data) diff --git a/dev/tests_common/_internals/forbidden_warnings.py b/tests_common/_internals/forbidden_warnings.py similarity index 99% rename from dev/tests_common/_internals/forbidden_warnings.py rename to tests_common/_internals/forbidden_warnings.py index ce24878510667..0b0a11262b3b6 100644 --- a/dev/tests_common/_internals/forbidden_warnings.py +++ b/tests_common/_internals/forbidden_warnings.py @@ -81,7 +81,7 @@ def pytest_itemcollected(self, item: pytest.Item): @pytest.hookimpl(hookwrapper=True, trylast=True) def pytest_sessionfinish(self, session: pytest.Session, exitstatus: int): - """Save set of test node ids in the session finish on xdist worker node""" + """Save set of test node ids in the session finish on xdist worker node.""" yield if self.is_worker_node and self.detected_cases and hasattr(self.config, "workeroutput"): self.config.workeroutput[self.node_key] = frozenset(self.detected_cases) diff --git a/dev/tests_common/pyproject.toml b/tests_common/pyproject.toml similarity index 98% rename from dev/tests_common/pyproject.toml rename to tests_common/pyproject.toml index 092ad7c7c5f5b..7cb353285ddd7 100644 --- a/dev/tests_common/pyproject.toml +++ b/tests_common/pyproject.toml @@ -35,4 +35,4 @@ disable = true include = ["**/*.py"] [tool.hatch.build.targets.wheel.sources] -"" = "dev/tests_common" +"" = "tests_common" diff --git a/dev/tests_common/pytest_plugin.py b/tests_common/pytest_plugin.py similarity index 97% rename from dev/tests_common/pytest_plugin.py rename to tests_common/pytest_plugin.py index 5694fe1b3403f..60638d8a5a756 100644 --- a/dev/tests_common/pytest_plugin.py +++ b/tests_common/pytest_plugin.py @@ -34,8 +34,8 @@ if TYPE_CHECKING: from itsdangerous import URLSafeSerializer - from dev.tests_common._internals.capture_warnings import CaptureWarningsPlugin # noqa: F401 - from dev.tests_common._internals.forbidden_warnings import ForbiddenWarningsPlugin # noqa: F401 + from tests_common._internals.capture_warnings import CaptureWarningsPlugin # noqa: F401 + from tests_common._internals.forbidden_warnings import ForbiddenWarningsPlugin # noqa: F401 # https://docs.pytest.org/en/stable/reference/reference.html#stash capture_warnings_key = pytest.StashKey["CaptureWarningsPlugin"]() @@ -133,8 +133,7 @@ @pytest.fixture def reset_db(): - """Resets Airflow db.""" - + """Reset Airflow db.""" from airflow.utils import db db.resetdb() @@ -145,7 +144,7 @@ def reset_db(): @pytest.fixture(autouse=True) def trace_sql(request): - from dev.tests_common.test_utils.perf.perf_kit.sqlalchemy import ( # isort: skip + from tests_common.test_utils.perf.perf_kit.sqlalchemy import ( # isort: skip count_queries, trace_queries, ) @@ -325,10 +324,10 @@ def pytest_addoption(parser: pytest.Parser): @pytest.fixture(autouse=True, scope="session") def initialize_airflow_tests(request): - """Helper that setups Airflow testing environment.""" + """Set up Airflow testing environment.""" print(" AIRFLOW ".center(60, "=")) - from dev.tests_common.test_utils.db import initial_db_init + from tests_common.test_utils.db import initial_db_init # Setup test environment for breeze home = os.path.expanduser("~") @@ -340,7 +339,7 @@ def initialize_airflow_tests(request): lock_file = os.path.join(airflow_home, ".airflow_db_initialised") if not skip_db_tests: if request.config.option.db_init: - from dev.tests_common.test_utils.db import initial_db_init + from tests_common.test_utils.db import initial_db_init print("Initializing the DB - forced with --with-db-init switch.") initial_db_init() @@ -431,7 +430,7 @@ def pytest_configure(config: pytest.Config) -> None: forbidden_warnings: list[str] | None = config.getini("forbidden_warnings") if not config.option.disable_forbidden_warnings and forbidden_warnings: - from dev.tests_common._internals.forbidden_warnings import ForbiddenWarningsPlugin + from tests_common._internals.forbidden_warnings import ForbiddenWarningsPlugin forbidden_warnings_plugin = ForbiddenWarningsPlugin( config=config, @@ -441,7 +440,7 @@ def pytest_configure(config: pytest.Config) -> None: config.stash[forbidden_warnings_key] = forbidden_warnings_plugin if not config.option.disable_capture_warnings: - from dev.tests_common._internals.capture_warnings import CaptureWarningsPlugin + from tests_common._internals.capture_warnings import CaptureWarningsPlugin capture_warnings_plugin = CaptureWarningsPlugin( config=config, output_path=config.getoption("warning_output_path", default=None) @@ -678,7 +677,8 @@ def pytest_runtest_setup(item): @pytest.fixture def frozen_sleep(monkeypatch): - """Use time-machine to "stub" sleep. + """ + Use time-machine to "stub" sleep. This means the ``sleep()`` takes no time, but ``datetime.now()`` appears to move forwards. @@ -717,7 +717,8 @@ def fake_sleep(seconds): @pytest.fixture def dag_maker(request): - """Fixture to help create DAG, DagModel, and SerializedDAG automatically. + """ + Fixture to help create DAG, DagModel, and SerializedDAG automatically. You have to use the dag_maker as a context manager and it takes the same argument as DAG:: @@ -824,8 +825,7 @@ def create_dagrun(self, **kwargs): from airflow.utils import timezone from airflow.utils.state import State from airflow.utils.types import DagRunType - - from dev.tests_common.test_utils.compat import AIRFLOW_V_3_0_PLUS + from tests_common.test_utils.compat import AIRFLOW_V_3_0_PLUS if AIRFLOW_V_3_0_PLUS: from airflow.utils.types import DagRunTriggeredByType @@ -922,8 +922,7 @@ def cleanup(self): from airflow.models.serialized_dag import SerializedDagModel from airflow.models.taskmap import TaskMap from airflow.utils.retries import run_with_db_retries - - from dev.tests_common.test_utils.compat import AssetEvent + from tests_common.test_utils.compat import AssetEvent for attempt in run_with_db_retries(logger=self.log): with attempt: @@ -970,7 +969,8 @@ def cleanup(self): @pytest.fixture def create_dummy_dag(dag_maker): - """Create a `DAG` with a single `EmptyOperator` task. + """ + Create a `DAG` with a single `EmptyOperator` task. DagRun and DagModel is also created. @@ -1006,7 +1006,7 @@ def create_dag( **kwargs, ): op_kwargs = {} - from dev.tests_common.test_utils.compat import AIRFLOW_V_2_9_PLUS + from tests_common.test_utils.compat import AIRFLOW_V_2_9_PLUS if AIRFLOW_V_2_9_PLUS: op_kwargs["task_display_name"] = task_display_name @@ -1038,7 +1038,8 @@ def create_dag( @pytest.fixture def create_task_instance(dag_maker, create_dummy_dag): - """Create a TaskInstance, and associated DB rows (DagRun, DagModel, etc). + """ + Create a TaskInstance, and associated DB rows (DagRun, DagModel, etc). Uses ``create_dummy_dag`` to create the dag structure. """ @@ -1068,7 +1069,7 @@ def maker( map_index=-1, **kwargs, ) -> TaskInstance: - from dev.tests_common.test_utils.compat import AIRFLOW_V_3_0_PLUS + from tests_common.test_utils.compat import AIRFLOW_V_3_0_PLUS if AIRFLOW_V_3_0_PLUS: from airflow.utils.types import DagRunTriggeredByType @@ -1079,7 +1080,7 @@ def maker( execution_date = timezone.utcnow() with dag_maker(dag_id, **kwargs): op_kwargs = {} - from dev.tests_common.test_utils.compat import AIRFLOW_V_2_9_PLUS + from tests_common.test_utils.compat import AIRFLOW_V_2_9_PLUS if AIRFLOW_V_2_9_PLUS: op_kwargs["task_display_name"] = task_display_name @@ -1243,7 +1244,7 @@ def reset_logging_config(): def suppress_info_logs_for_dag_and_fab(): import logging - from dev.tests_common.test_utils.compat import AIRFLOW_V_2_9_PLUS + from tests_common.test_utils.compat import AIRFLOW_V_2_9_PLUS dag_logger = logging.getLogger("airflow.models.dag") dag_logger.setLevel(logging.WARNING) @@ -1259,7 +1260,7 @@ def suppress_info_logs_for_dag_and_fab(): @pytest.fixture(scope="module", autouse=True) def _clear_db(request): """Clear DB before each test module run.""" - from dev.tests_common.test_utils.db import clear_all, initial_db_init + from tests_common.test_utils.db import clear_all, initial_db_init if not request.config.option.db_cleanup: return @@ -1396,7 +1397,7 @@ def hook_lineage_collector(): @pytest.fixture def clean_dags_and_dagruns(): """Fixture that cleans the database before and after every test.""" - from dev.tests_common.test_utils.db import clear_db_dags, clear_db_runs + from tests_common.test_utils.db import clear_db_dags, clear_db_runs clear_db_runs() clear_db_dags() @@ -1407,7 +1408,7 @@ def clean_dags_and_dagruns(): @pytest.fixture(scope="session") def app(): - from dev.tests_common.test_utils.config import conf_vars + from tests_common.test_utils.config import conf_vars with conf_vars({("fab", "auth_rate_limited"): "False"}): from airflow.www import app diff --git a/dev/tests_common/test_utils/README.md b/tests_common/test_utils/README.md similarity index 100% rename from dev/tests_common/test_utils/README.md rename to tests_common/test_utils/README.md diff --git a/dev/tests_common/test_utils/__init__.py b/tests_common/test_utils/__init__.py similarity index 94% rename from dev/tests_common/test_utils/__init__.py rename to tests_common/test_utils/__init__.py index e440178fae6c7..c27a6b55209c1 100644 --- a/dev/tests_common/test_utils/__init__.py +++ b/tests_common/test_utils/__init__.py @@ -19,4 +19,4 @@ from pathlib import Path -AIRFLOW_MAIN_FOLDER = Path(__file__).parents[3] +AIRFLOW_MAIN_FOLDER = Path(__file__).parents[2] diff --git a/dev/tests_common/test_utils/api_connexion_utils.py b/tests_common/test_utils/api_connexion_utils.py similarity index 91% rename from dev/tests_common/test_utils/api_connexion_utils.py rename to tests_common/test_utils/api_connexion_utils.py index 2d273af2e6878..23a273d93557f 100644 --- a/dev/tests_common/test_utils/api_connexion_utils.py +++ b/tests_common/test_utils/api_connexion_utils.py @@ -20,8 +20,7 @@ from typing import TYPE_CHECKING from airflow.api_connexion.exceptions import EXCEPTIONS_LINK_MAP - -from dev.tests_common.test_utils.compat import ignore_provider_compatibility_error +from tests_common.test_utils.compat import ignore_provider_compatibility_error with ignore_provider_compatibility_error("2.9.0+", __file__): from airflow.providers.fab.auth_manager.security_manager.override import EXISTING_ROLES @@ -32,9 +31,7 @@ @contextmanager def create_test_client(app, user_name, role_name, permissions): - """ - Helper function to create a client with a temporary user which will be deleted once done - """ + """Create a client with a temporary user which will be deleted once done.""" client = app.test_client() with create_user_scope(app, username=user_name, role_name=role_name, permissions=permissions) as _: resp = client.post("/login/", data={"username": user_name, "password": user_name}) @@ -45,9 +42,10 @@ def create_test_client(app, user_name, role_name, permissions): @contextmanager def create_user_scope(app, username, **kwargs): """ - Helper function designed to be used with pytest fixture mainly. + Create user scope for use pytest fixture mainly. + It will create a user and provide it for the fixture via YIELD (generator) - then will tidy up once test is complete + then will tidy up once test is complete. """ test_user = create_user(app, username, **kwargs) diff --git a/dev/tests_common/test_utils/asserts.py b/tests_common/test_utils/asserts.py similarity index 95% rename from dev/tests_common/test_utils/asserts.py rename to tests_common/test_utils/asserts.py index 56bf8cc1fee57..59ca9bad968ea 100644 --- a/dev/tests_common/test_utils/asserts.py +++ b/tests_common/test_utils/asserts.py @@ -46,6 +46,8 @@ def _trim(s): class QueriesTraceRecord(NamedTuple): + """QueriesTraceRecord holds information about the query executed in the context.""" + module: str name: str lineno: int | None @@ -63,6 +65,8 @@ def __str__(self): class QueriesTraceInfo(NamedTuple): + """QueriesTraceInfo holds information about the queries executed in the context.""" + traces: tuple[QueriesTraceRecord, ...] @classmethod @@ -144,14 +148,15 @@ def assert_queries_count( session: Session | None = None, ): """ - Asserts that the number of queries is as expected with the margin applied + Assert that the number of queries is as expected with the margin applied. + The margin is helpful in case of complex cases where we do not want to change it every time we changed queries, but we want to catch cases where we spin out of control :param expected_count: expected number of queries :param message_fmt: message printed optionally if the number is exceeded :param margin: margin to add to expected number of calls :param stacklevel: limits the output stack trace to that numbers of frame - :param stacklevel_from_module: Filter stack trace from specific module + :param stacklevel_from_module: Filter stack trace from specific module. """ with count_queries( stacklevel=stacklevel, stacklevel_from_module=stacklevel_from_module, session=session diff --git a/dev/tests_common/test_utils/azure_system_helpers.py b/tests_common/test_utils/azure_system_helpers.py similarity index 93% rename from dev/tests_common/test_utils/azure_system_helpers.py rename to tests_common/test_utils/azure_system_helpers.py index b1a46617c082f..057124dea1f29 100644 --- a/dev/tests_common/test_utils/azure_system_helpers.py +++ b/tests_common/test_utils/azure_system_helpers.py @@ -28,9 +28,8 @@ from airflow.models import Connection from airflow.providers.microsoft.azure.hooks.fileshare import AzureFileShareHook from airflow.utils.process_utils import patch_environ - -from dev.tests_common.test_utils import AIRFLOW_MAIN_FOLDER -from dev.tests_common.test_utils.system_tests_class import SystemTest +from tests_common.test_utils import AIRFLOW_MAIN_FOLDER +from tests_common.test_utils.system_tests_class import SystemTest AZURE_DAG_FOLDER = os.path.join( AIRFLOW_MAIN_FOLDER, "airflow", "providers", "microsoft", "azure", "example_dags" @@ -44,7 +43,7 @@ @contextmanager def provide_wasb_default_connection(key_file_path: str): """ - Context manager to provide a temporary value for wasb_default connection + Context manager to provide a temporary value for wasb_default connection. :param key_file_path: Path to file with wasb_default credentials .json file. """ @@ -67,7 +66,8 @@ def provide_wasb_default_connection(key_file_path: str): @contextmanager def provide_azure_data_lake_default_connection(key_file_path: str): """ - Context manager to provide a temporary value for azure_data_lake_default connection + Provide a temporary value for azure_data_lake_default connection. + :param key_file_path: Path to file with azure_data_lake_default credentials .json file. """ required_fields = {"login", "password", "extra"} @@ -106,6 +106,8 @@ def provide_azure_fileshare(share_name: str, azure_fileshare_conn_id: str, file_ @pytest.mark.system("azure") class AzureSystemTest(SystemTest): + """Base class for Azure system tests.""" + @classmethod def create_share(cls, share_name: str, azure_fileshare_conn_id: str): hook = AzureFileShareHook(azure_fileshare_conn_id=azure_fileshare_conn_id) @@ -138,9 +140,7 @@ def upload_file_from_string( @classmethod def prepare_share(cls, share_name: str, azure_fileshare_conn_id: str, file_name: str, directory: str): - """ - Create share with a file in given directory. If directory is None, file is in root dir. - """ + """Create share with a file in given directory. If directory is None, file is in root dir.""" hook = AzureFileShareHook( azure_fileshare_conn_id=azure_fileshare_conn_id, share_name=share_name, diff --git a/dev/tests_common/test_utils/compat.py b/tests_common/test_utils/compat.py similarity index 99% rename from dev/tests_common/test_utils/compat.py rename to tests_common/test_utils/compat.py index 67a111350daff..bc04f798e027e 100644 --- a/dev/tests_common/test_utils/compat.py +++ b/tests_common/test_utils/compat.py @@ -116,7 +116,7 @@ def connection_to_dict( connection: Connection, *, prune_empty: bool = False, validate: bool = True ) -> dict[str, Any]: """ - Convert Connection to json-serializable dictionary (compatibility code for Airflow 2.7 tests) + Convert Connection to json-serializable dictionary (compatibility code for Airflow 2.7 tests). :param connection: connection to convert to dict :param prune_empty: Whether or not remove empty values. diff --git a/dev/tests_common/test_utils/config.py b/tests_common/test_utils/config.py similarity index 100% rename from dev/tests_common/test_utils/config.py rename to tests_common/test_utils/config.py diff --git a/dev/tests_common/test_utils/db.py b/tests_common/test_utils/db.py similarity index 97% rename from dev/tests_common/test_utils/db.py rename to tests_common/test_utils/db.py index 4b2dede05ead7..bf92c3a2582d8 100644 --- a/dev/tests_common/test_utils/db.py +++ b/tests_common/test_utils/db.py @@ -44,8 +44,7 @@ from airflow.security.permissions import RESOURCE_DAG_PREFIX from airflow.utils.db import add_default_pool_if_not_exists, create_default_connections, reflect_tables from airflow.utils.session import create_session - -from dev.tests_common.test_utils.compat import ( +from tests_common.test_utils.compat import ( AIRFLOW_V_2_10_PLUS, AssetDagRunQueue, AssetEvent, @@ -63,8 +62,7 @@ def initial_db_init(): from airflow.utils import db from airflow.www.extensions.init_appbuilder import init_appbuilder from airflow.www.extensions.init_auth_manager import get_auth_manager - - from dev.tests_common.test_utils.compat import AIRFLOW_V_2_8_PLUS + from tests_common.test_utils.compat import AIRFLOW_V_2_8_PLUS db.resetdb() db.bootstrap_dagbag() @@ -106,7 +104,7 @@ def clear_db_assets(): session.query(DagScheduleAssetReference).delete() session.query(TaskOutletAssetReference).delete() if AIRFLOW_V_2_10_PLUS: - from dev.tests_common.test_utils.compat import AssetAliasModel + from tests_common.test_utils.compat import AssetAliasModel session.query(AssetAliasModel).delete() diff --git a/dev/tests_common/test_utils/decorators.py b/tests_common/test_utils/decorators.py similarity index 100% rename from dev/tests_common/test_utils/decorators.py rename to tests_common/test_utils/decorators.py diff --git a/dev/tests_common/test_utils/fake_datetime.py b/tests_common/test_utils/fake_datetime.py similarity index 92% rename from dev/tests_common/test_utils/fake_datetime.py rename to tests_common/test_utils/fake_datetime.py index 6af41e15efc0c..3aba78e767077 100644 --- a/dev/tests_common/test_utils/fake_datetime.py +++ b/tests_common/test_utils/fake_datetime.py @@ -21,9 +21,7 @@ class FakeDatetime(datetime): - """ - A fake replacement for datetime that can be mocked for testing. - """ + """A fake replacement for datetime that can be mocked for testing.""" def __new__(cls, *args, **kwargs): return datetime.__new__(datetime, *args, **kwargs) diff --git a/dev/tests_common/test_utils/gcp_system_helpers.py b/tests_common/test_utils/gcp_system_helpers.py similarity index 95% rename from dev/tests_common/test_utils/gcp_system_helpers.py rename to tests_common/test_utils/gcp_system_helpers.py index e17679bd8eb56..82b16da8490b7 100644 --- a/dev/tests_common/test_utils/gcp_system_helpers.py +++ b/tests_common/test_utils/gcp_system_helpers.py @@ -30,10 +30,10 @@ import airflow.providers.google from airflow.providers.google.cloud.utils.credentials_provider import provide_gcp_conn_and_credentials +from tests_common.test_utils import AIRFLOW_MAIN_FOLDER +from tests_common.test_utils.logging_command_executor import CommandExecutor +from tests_common.test_utils.system_tests_class import SystemTest -from dev.tests_common.test_utils import AIRFLOW_MAIN_FOLDER -from dev.tests_common.test_utils.logging_command_executor import CommandExecutor -from dev.tests_common.test_utils.system_tests_class import SystemTest from providers.tests.google.cloud.utils.gcp_authenticator import GCP_GCS_KEY, GCP_SECRET_MANAGER_KEY GCP_DIR = Path(airflow.providers.google.__file__).parent @@ -49,7 +49,7 @@ def resolve_full_gcp_key_path(key: str) -> str: """ - Returns path full path to provided GCP key. + Return path full path to provided GCP key. :param key: Name of the GCP key, for example ``my_service.json`` :returns: Full path to the key @@ -66,7 +66,7 @@ def provide_gcp_context( project_id: str | None = None, ): """ - Context manager that provides: + Provide context manager for GCP. - GCP credentials for application supporting `Application Default Credentials (ADC) strategy `__. @@ -115,6 +115,8 @@ def provide_gcs_bucket(bucket_name: str): @pytest.mark.system("google") class GoogleSystemTest(SystemTest): + """Base class for Google system tests.""" + @staticmethod def execute_cmd(*args, **kwargs): executor = CommandExecutor() @@ -132,10 +134,7 @@ def _service_key(): def execute_with_ctx( cls, cmd: list[str], key: str = GCP_GCS_KEY, project_id=None, scopes=None, silent: bool = False ): - """ - Executes command with context created by provide_gcp_context and activated - service key. - """ + """Execute command with context created by provide_gcp_context and activated service key.""" current_project_id = project_id or cls._project_id() with provide_gcp_context(key, project_id=current_project_id, scopes=scopes): cls.execute_cmd(cmd=cmd, silent=silent) diff --git a/dev/tests_common/test_utils/get_all_tests.py b/tests_common/test_utils/get_all_tests.py similarity index 92% rename from dev/tests_common/test_utils/get_all_tests.py rename to tests_common/test_utils/get_all_tests.py index 5081243c9e93a..000f2e63b34bd 100644 --- a/dev/tests_common/test_utils/get_all_tests.py +++ b/tests_common/test_utils/get_all_tests.py @@ -16,9 +16,7 @@ # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. -""" -Gets all tests cases from xunit file. -""" +"""Gets all tests cases from xunit file.""" from __future__ import annotations @@ -28,7 +26,7 @@ def last_replace(s, old, new, number_of_occurrences): """ - Replaces last n occurrences of the old string with the new one within the string provided + Replace last n occurrences of the old string with the new one within the string provided. :param s: string to replace occurrences with :param old: old string @@ -42,7 +40,7 @@ def last_replace(s, old, new, number_of_occurrences): def print_all_cases(xunit_test_file_path): """ - Prints all test cases read from the xunit test file + Print all test cases read from the xunit test file. :param xunit_test_file_path: path of the xunit file :return: None diff --git a/dev/tests_common/test_utils/hdfs_utils.py b/tests_common/test_utils/hdfs_utils.py similarity index 95% rename from dev/tests_common/test_utils/hdfs_utils.py rename to tests_common/test_utils/hdfs_utils.py index f429c9ab0cf45..26eb3a78a47de 100644 --- a/dev/tests_common/test_utils/hdfs_utils.py +++ b/tests_common/test_utils/hdfs_utils.py @@ -19,6 +19,8 @@ class FakeWebHDFSHook: + """Fake WebHDFSHook for testing purposes.""" + def __init__(self, conn_id): self.conn_id = conn_id diff --git a/dev/tests_common/test_utils/logging_command_executor.py b/tests_common/test_utils/logging_command_executor.py similarity index 97% rename from dev/tests_common/test_utils/logging_command_executor.py rename to tests_common/test_utils/logging_command_executor.py index 1773cda30d6f6..d41a3ea1ad9dc 100644 --- a/dev/tests_common/test_utils/logging_command_executor.py +++ b/tests_common/test_utils/logging_command_executor.py @@ -25,10 +25,12 @@ class CommandExecutionError(Exception): - """Raise in case of error during command execution""" + """Raise in case of error during command execution.""" class LoggingCommandExecutor(LoggingMixin): + """Logging command executor.""" + def execute_cmd(self, cmd, silent=False, cwd=None, env=None): if silent: self.log.info("Executing in silent mode: '%s'", " ".join(shlex.quote(c) for c in cmd)) @@ -70,6 +72,8 @@ def check_output(self, cmd): class CommandExecutor(LoggingCommandExecutor): """ + Command executor. + Due to 'LoggingCommandExecutor' class just returns the status code of command execution ('execute_cmd' method) and continues to perform code with possible errors, separate inherited 'CommandExecutor' class was created to use it if you need to break code performing diff --git a/dev/tests_common/test_utils/mapping.py b/tests_common/test_utils/mapping.py similarity index 100% rename from dev/tests_common/test_utils/mapping.py rename to tests_common/test_utils/mapping.py diff --git a/dev/tests_common/test_utils/mock_executor.py b/tests_common/test_utils/mock_executor.py similarity index 97% rename from dev/tests_common/test_utils/mock_executor.py rename to tests_common/test_utils/mock_executor.py index 5080290500c9c..506c0447589ac 100644 --- a/dev/tests_common/test_utils/mock_executor.py +++ b/tests_common/test_utils/mock_executor.py @@ -28,9 +28,7 @@ class MockExecutor(BaseExecutor): - """ - TestExecutor is used for unit testing purposes. - """ + """TestExecutor is used for unit testing purposes.""" supports_pickling = False mock_module_path = "mock.executor.path" @@ -98,6 +96,8 @@ def change_state(self, key, state, info=None): def mock_task_fail(self, dag_id, task_id, run_id: str, try_number=1): """ + Mock for test failures. + Set the mock outcome of running this particular task instances to FAILED. diff --git a/dev/tests_common/test_utils/mock_operators.py b/tests_common/test_utils/mock_operators.py similarity index 84% rename from dev/tests_common/test_utils/mock_operators.py rename to tests_common/test_utils/mock_operators.py index 0df0afec824c3..7cc807a3a485b 100644 --- a/dev/tests_common/test_utils/mock_operators.py +++ b/tests_common/test_utils/mock_operators.py @@ -23,8 +23,7 @@ from airflow.models.baseoperator import BaseOperator from airflow.models.xcom import XCom - -from dev.tests_common.test_utils.compat import BaseOperatorLink +from tests_common.test_utils.compat import BaseOperatorLink if TYPE_CHECKING: import jinja2 @@ -47,12 +46,16 @@ def execute(self, context: Context): class NestedFields: + """Nested fields for testing purposes.""" + def __init__(self, field_1, field_2): self.field_1 = field_1 self.field_2 = field_2 class MockOperatorWithNestedFields(BaseOperator): + """Operator with nested fields for testing purposes.""" + template_fields: Sequence[str] = ("arg1", "arg2") def __init__(self, arg1: str = "", arg2: NestedFields | None = None, **kwargs): @@ -85,9 +88,7 @@ def execute(self, context: Context): class AirflowLink(BaseOperatorLink): - """ - Operator Link for Apache Airflow Website - """ + """Operator Link for Apache Airflow Website.""" name = "airflow" @@ -95,19 +96,23 @@ def get_link(self, operator, *, ti_key): return "https://airflow.apache.org" -class Dummy2TestOperator(BaseOperator): +class EmptyExtraLinkTestOperator(BaseOperator): """ + Empty test operator with extra link. + Example of an Operator that has an extra operator link - and will be overridden by the one defined in tests/plugins/test_plugin.py + and will be overridden by the one defined in tests/plugins/test_plugin.py. """ operator_extra_links = (AirflowLink(),) -class Dummy3TestOperator(BaseOperator): +class EmptyNoExtraLinkTestOperator(BaseOperator): """ + Empty test operator without extra operator link. + Example of an operator that has no extra Operator link. - An operator link would be added to this operator via Airflow plugin + An operator link would be added to this operator via Airflow plugin. """ operator_extra_links = () @@ -115,6 +120,8 @@ class Dummy3TestOperator(BaseOperator): @attr.s(auto_attribs=True) class CustomBaseIndexOpLink(BaseOperatorLink): + """Custom Operator Link for Google BigQuery Console.""" + index: int = attr.ib() @property @@ -134,6 +141,8 @@ def get_link(self, operator, *, ti_key): class CustomOpLink(BaseOperatorLink): + """Custom Operator with Link for Google Custom Search.""" + name = "Google Custom" def get_link(self, operator, *, ti_key): @@ -146,14 +155,14 @@ def get_link(self, operator, *, ti_key): class CustomOperator(BaseOperator): + """Custom Operator for testing purposes.""" + template_fields = ["bash_command"] custom_operator_name = "@custom" @property def operator_extra_links(self): - """ - Return operator extra links - """ + """Return operator extra links.""" if isinstance(self.bash_command, str) or self.bash_command is None: return (CustomOpLink(),) return (CustomBaseIndexOpLink(i) for i, _ in enumerate(self.bash_command)) @@ -168,33 +177,27 @@ def execute(self, context: Context): class GoogleLink(BaseOperatorLink): - """ - Operator Link for Apache Airflow Website for Google - """ + """Operator Link for Apache Airflow Website for Google.""" name = "google" - operators = [Dummy3TestOperator, CustomOperator] + operators = [EmptyNoExtraLinkTestOperator, CustomOperator] def get_link(self, operator, *, ti_key): return "https://www.google.com" class AirflowLink2(BaseOperatorLink): - """ - Operator Link for Apache Airflow Website for 1.10.5 - """ + """Operator Link for Apache Airflow Website for 1.10.5.""" name = "airflow" - operators = [Dummy2TestOperator, Dummy3TestOperator] + operators = [EmptyExtraLinkTestOperator, EmptyNoExtraLinkTestOperator] def get_link(self, operator, *, ti_key): return "https://airflow.apache.org/1.10.5/" class GithubLink(BaseOperatorLink): - """ - Operator Link for Apache Airflow GitHub - """ + """Operator Link for Apache Airflow GitHub.""" name = "github" @@ -203,6 +206,8 @@ def get_link(self, operator, *, ti_key): class DeprecatedOperator(BaseOperator): + """Deprecated Operator for testing purposes.""" + def __init__(self, **kwargs): warnings.warn("This operator is deprecated.", DeprecationWarning, stacklevel=2) super().__init__(**kwargs) diff --git a/dev/tests_common/test_utils/mock_plugins.py b/tests_common/test_utils/mock_plugins.py similarity index 100% rename from dev/tests_common/test_utils/mock_plugins.py rename to tests_common/test_utils/mock_plugins.py diff --git a/dev/tests_common/test_utils/mock_security_manager.py b/tests_common/test_utils/mock_security_manager.py similarity index 89% rename from dev/tests_common/test_utils/mock_security_manager.py rename to tests_common/test_utils/mock_security_manager.py index 6b9f45e3d8410..ee0f49372afa9 100644 --- a/dev/tests_common/test_utils/mock_security_manager.py +++ b/tests_common/test_utils/mock_security_manager.py @@ -16,13 +16,15 @@ # under the License. from __future__ import annotations -from dev.tests_common.test_utils.compat import ignore_provider_compatibility_error +from tests_common.test_utils.compat import ignore_provider_compatibility_error with ignore_provider_compatibility_error("2.9.0", __file__): from airflow.providers.fab.auth_manager.security_manager.override import FabAirflowSecurityManagerOverride class MockSecurityManager(FabAirflowSecurityManagerOverride): + """Mock Security Manager for testing purposes.""" + VIEWER_VMS = { "Airflow", } diff --git a/dev/tests_common/test_utils/operators/__init__.py b/tests_common/test_utils/operators/__init__.py similarity index 100% rename from dev/tests_common/test_utils/operators/__init__.py rename to tests_common/test_utils/operators/__init__.py diff --git a/dev/tests_common/test_utils/operators/postgres_local_executor.cfg b/tests_common/test_utils/operators/postgres_local_executor.cfg similarity index 100% rename from dev/tests_common/test_utils/operators/postgres_local_executor.cfg rename to tests_common/test_utils/operators/postgres_local_executor.cfg diff --git a/dev/tests_common/test_utils/perf/__init__.py b/tests_common/test_utils/perf/__init__.py similarity index 100% rename from dev/tests_common/test_utils/perf/__init__.py rename to tests_common/test_utils/perf/__init__.py diff --git a/dev/tests_common/test_utils/perf/perf_kit/__init__.py b/tests_common/test_utils/perf/perf_kit/__init__.py similarity index 99% rename from dev/tests_common/test_utils/perf/perf_kit/__init__.py rename to tests_common/test_utils/perf/perf_kit/__init__.py index 011276155429f..84f0f335b1b19 100644 --- a/dev/tests_common/test_utils/perf/perf_kit/__init__.py +++ b/tests_common/test_utils/perf/perf_kit/__init__.py @@ -15,13 +15,10 @@ # specific language governing permissions and limitations # under the License. """ - -Perf-kit -======== +Perf-kit. Useful decorators and context managers used when testing the performance of various Airflow components. - Content ======== diff --git a/dev/tests_common/test_utils/perf/perf_kit/memory.py b/tests_common/test_utils/perf/perf_kit/memory.py similarity index 94% rename from dev/tests_common/test_utils/perf/perf_kit/memory.py rename to tests_common/test_utils/perf/perf_kit/memory.py index b236630f5f6c7..195a22d0bd9ff 100644 --- a/dev/tests_common/test_utils/perf/perf_kit/memory.py +++ b/tests_common/test_utils/perf/perf_kit/memory.py @@ -37,7 +37,7 @@ def _human_readable_size(size, decimal_places=3): class TraceMemoryResult: - """Trace results of memory,""" + """Trace results of memory,.""" def __init__(self): self.before = 0 @@ -48,7 +48,7 @@ def __init__(self): @contextmanager def trace_memory(human_readable=True, gc_collect=False): """ - Calculates the amount of difference in free memory before and after script execution. + Decorate function and calculate the amount of difference in free memory before and after script execution. In other words, how much data the code snippet has used up memory. diff --git a/dev/tests_common/test_utils/perf/perf_kit/python.py b/tests_common/test_utils/perf/perf_kit/python.py similarity index 90% rename from dev/tests_common/test_utils/perf/perf_kit/python.py rename to tests_common/test_utils/perf/perf_kit/python.py index 2589d9753451b..054fd0c0897a3 100644 --- a/dev/tests_common/test_utils/perf/perf_kit/python.py +++ b/tests_common/test_utils/perf/perf_kit/python.py @@ -30,8 +30,9 @@ @contextlib.contextmanager def pyspy(): """ - This decorator provide deterministic profiling. It generate and save flame graph to file. It uses``pyspy`` - internally. + Decorate methods for deterministic profiling. + + It generates and saves flame graph to file. It uses``pyspy` internally. Running py-spy inside of a docker container will also usually bring up a permissions denied error even when running as root. @@ -65,8 +66,9 @@ def pyspy(): @contextlib.contextmanager def profiled(print_callers=False): """ - This decorator provide deterministic profiling. It uses ``cProfile`` internally. It generates statistic - and print on the screen. + Decorate function with deterministic profiling. + + It uses ``cProfile`` internally. It generates statistics and prints on the screen. """ profile = cProfile.Profile() profile.enable() @@ -86,10 +88,7 @@ def profiled(print_callers=False): if __name__ == "__main__": def case(): - """ - Load modules. - :return: - """ + """Load modules.""" import logging import airflow diff --git a/dev/tests_common/test_utils/perf/perf_kit/repeat_and_time.py b/tests_common/test_utils/perf/perf_kit/repeat_and_time.py similarity index 92% rename from dev/tests_common/test_utils/perf/perf_kit/repeat_and_time.py rename to tests_common/test_utils/perf/perf_kit/repeat_and_time.py index 290cdeabc8766..ef179d8ea835f 100644 --- a/dev/tests_common/test_utils/perf/perf_kit/repeat_and_time.py +++ b/tests_common/test_utils/perf/perf_kit/repeat_and_time.py @@ -36,7 +36,7 @@ def __init__(self): @contextlib.contextmanager def timing(repeat_count: int = 1): """ - Measures code execution time. + Measure code execution time. :param repeat_count: If passed, the result will be divided by the value. """ @@ -60,7 +60,7 @@ def timing(repeat_count: int = 1): def repeat(repeat_count=5): """ - Function decorators that repeat function many times. + Decorate functions that repeats many times. :param repeat_count: The repeat count """ @@ -79,13 +79,13 @@ def wrap(*args, **kwargs): class TimeoutException(Exception): - """Exception when the test timeo uts""" + """The exception raised when the test timeouts.""" @contextlib.contextmanager def timeout(seconds=1): """ - Executes code only limited seconds. If the code does not end during this time, it will be interrupted. + Execute code only limited seconds. If the code does not end during this time, it will be interrupted. :param seconds: Number of seconds """ @@ -114,7 +114,7 @@ def handle_timeout(signum, frame): if __name__ == "__main__": def monte_carlo(total=10000): - """Monte Carlo""" + """Monte Carlo.""" inside = 0 for _ in range(total): @@ -140,7 +140,7 @@ def monte_carlo(total=10000): @repeat(REPEAT_COUNT) @timing() def get_pi(): - """Returns PI value:""" + """Return PI value.""" return monte_carlo() res = get_pi() diff --git a/dev/tests_common/test_utils/perf/perf_kit/sqlalchemy.py b/tests_common/test_utils/perf/perf_kit/sqlalchemy.py similarity index 97% rename from dev/tests_common/test_utils/perf/perf_kit/sqlalchemy.py rename to tests_common/test_utils/perf/perf_kit/sqlalchemy.py index f7fe68d779371..ff17f17b1962b 100644 --- a/dev/tests_common/test_utils/perf/perf_kit/sqlalchemy.py +++ b/tests_common/test_utils/perf/perf_kit/sqlalchemy.py @@ -35,7 +35,7 @@ def _pretty_format_sql(text: str): class TraceQueries: """ - Tracking SQL queries in a code block. + Track SQL queries in a code block. :param display_num: If True, displays the query number. :param display_time: If True, displays the query execution time. @@ -73,7 +73,7 @@ def before_cursor_execute( executemany, ): """ - Executed before cursor. + Execute before cursor. :param conn: connection :param cursor: cursor @@ -83,7 +83,6 @@ def before_cursor_execute( :param executemany: whether many statements executed :return: """ - conn.info.setdefault("query_start_time", []).append(time.monotonic()) self.query_count += 1 @@ -97,7 +96,7 @@ def after_cursor_execute( executemany, ): """ - Executed after cursor. + Execute after cursor. :param conn: connection :param cursor: cursor @@ -154,9 +153,7 @@ def __exit__(self, type_, value, traceback): class CountQueriesResult: - """ - Counter for number of queries. - """ + """Counter for number of queries.""" def __init__(self): self.count = 0 @@ -198,7 +195,7 @@ def after_cursor_execute( executemany, ): """ - Executed after cursor. + Execute after cursor. :param conn: connection :param cursor: cursor @@ -215,7 +212,7 @@ def after_cursor_execute( if __name__ == "__main__": # Example: def case(): - """Case of logging om/""" + """Case of logging om/.""" import logging from unittest import mock diff --git a/dev/tests_common/test_utils/permissions.py b/tests_common/test_utils/permissions.py similarity index 93% rename from dev/tests_common/test_utils/permissions.py rename to tests_common/test_utils/permissions.py index 46e964c1f6190..3abb5d0fbcdab 100644 --- a/dev/tests_common/test_utils/permissions.py +++ b/tests_common/test_utils/permissions.py @@ -21,6 +21,8 @@ def _resource_name(dag_id: str, resource_name: str) -> str: """ + Return resource name for given dag_id and resource_name in backwards compatible way. + This method is to keep compatibility with new FAB versions running with old airflow versions. """ diff --git a/dev/tests_common/test_utils/providers.py b/tests_common/test_utils/providers.py similarity index 94% rename from dev/tests_common/test_utils/providers.py rename to tests_common/test_utils/providers.py index 02ca9bed41989..34288d8680d29 100644 --- a/dev/tests_common/test_utils/providers.py +++ b/tests_common/test_utils/providers.py @@ -21,7 +21,7 @@ def object_exists(path: str): - """Returns true if importable python object is there.""" + """Return true if importable python object is there.""" from airflow.utils.module_loading import import_string try: @@ -33,7 +33,7 @@ def object_exists(path: str): def get_provider_version(provider_name): """ - Returns provider version given provider package name. + Return provider version given provider package name. Example:: if provider_version("apache-airflow-providers-cncf-kubernetes") >= (6, 0): diff --git a/dev/tests_common/test_utils/remote_user_api_auth_backend.py b/tests_common/test_utils/remote_user_api_auth_backend.py similarity index 97% rename from dev/tests_common/test_utils/remote_user_api_auth_backend.py rename to tests_common/test_utils/remote_user_api_auth_backend.py index 59df201e530e4..74f705bcf709a 100644 --- a/dev/tests_common/test_utils/remote_user_api_auth_backend.py +++ b/tests_common/test_utils/remote_user_api_auth_backend.py @@ -46,7 +46,7 @@ def _lookup_user(username: str): def requires_authentication(function: T): - """Decorator for functions that require authentication""" + """Decorate functions that require authentication.""" @wraps(function) def decorated(*args, **kwargs): diff --git a/dev/tests_common/test_utils/reset_warning_registry.py b/tests_common/test_utils/reset_warning_registry.py similarity index 96% rename from dev/tests_common/test_utils/reset_warning_registry.py rename to tests_common/test_utils/reset_warning_registry.py index d7d5c1ffe577b..4c6ae8d26b1a2 100644 --- a/dev/tests_common/test_utils/reset_warning_registry.py +++ b/tests_common/test_utils/reset_warning_registry.py @@ -34,7 +34,9 @@ # https://stackoverflow.com/questions/19428761/python-showing-once-warnings-again-resetting-all-warning-registries class reset_warning_registry: """ - context manager which archives & clears warning registry for duration of + Reset warning registry context manager. + + The context manager archives & clears warning registry for duration of context. :param pattern: diff --git a/dev/tests_common/test_utils/salesforce_system_helpers.py b/tests_common/test_utils/salesforce_system_helpers.py similarity index 100% rename from dev/tests_common/test_utils/salesforce_system_helpers.py rename to tests_common/test_utils/salesforce_system_helpers.py diff --git a/dev/tests_common/test_utils/sftp_system_helpers.py b/tests_common/test_utils/sftp_system_helpers.py similarity index 99% rename from dev/tests_common/test_utils/sftp_system_helpers.py rename to tests_common/test_utils/sftp_system_helpers.py index baed591b9004b..a599f120cb51b 100644 --- a/dev/tests_common/test_utils/sftp_system_helpers.py +++ b/tests_common/test_utils/sftp_system_helpers.py @@ -30,7 +30,7 @@ @contextmanager def provide_sftp_default_connection(key_file_path: str): """ - Context manager to provide a temporary value for sftp_default connection + Context manager to provide a temporary value for sftp_default connection. :param key_file_path: Path to file with sftp_default credentials .json file. """ diff --git a/dev/tests_common/test_utils/system_tests.py b/tests_common/test_utils/system_tests.py similarity index 100% rename from dev/tests_common/test_utils/system_tests.py rename to tests_common/test_utils/system_tests.py diff --git a/dev/tests_common/test_utils/system_tests_class.py b/tests_common/test_utils/system_tests_class.py similarity index 95% rename from dev/tests_common/test_utils/system_tests_class.py rename to tests_common/test_utils/system_tests_class.py index 5abdca96bee06..61f0b71d4c781 100644 --- a/dev/tests_common/test_utils/system_tests_class.py +++ b/tests_common/test_utils/system_tests_class.py @@ -28,9 +28,8 @@ from airflow.configuration import AIRFLOW_HOME, AirflowConfigParser, get_airflow_config from airflow.exceptions import AirflowException - -from dev.tests_common.test_utils import AIRFLOW_MAIN_FOLDER -from dev.tests_common.test_utils.logging_command_executor import get_executor +from tests_common.test_utils import AIRFLOW_MAIN_FOLDER +from tests_common.test_utils.logging_command_executor import get_executor DEFAULT_DAG_FOLDER = os.path.join(AIRFLOW_MAIN_FOLDER, "airflow", "example_dags") @@ -42,9 +41,7 @@ def get_default_logs_if_none(logs: str | None) -> str: def resolve_logs_folder() -> str: - """ - Returns LOGS folder specified in current Airflow config. - """ + """Return LOGS folder specified in current Airflow config.""" config_file = get_airflow_config(AIRFLOW_HOME) conf = AirflowConfigParser() conf.read(config_file) @@ -59,6 +56,8 @@ def resolve_logs_folder() -> str: class SystemTest: + """Base class for system tests.""" + log: logging.Logger @staticmethod @@ -70,6 +69,8 @@ def setup_logger(request): @pytest.fixture(autouse=True) def setup_system(self): """ + Set up system tests. + We want to avoid random errors while database got reset - those Are apparently triggered by parser trying to parse DAGs while The tables are dropped. We move the dags temporarily out of the dags folder diff --git a/dev/tests_common/test_utils/terraform.py b/tests_common/test_utils/terraform.py similarity index 93% rename from dev/tests_common/test_utils/terraform.py rename to tests_common/test_utils/terraform.py index b600ef6643b19..387d8cb28cafc 100644 --- a/dev/tests_common/test_utils/terraform.py +++ b/tests_common/test_utils/terraform.py @@ -16,10 +16,12 @@ # under the License. from __future__ import annotations -from dev.tests_common.test_utils.system_tests_class import SystemTest +from tests_common.test_utils.system_tests_class import SystemTest class Terraform(SystemTest): + """Base class for Terraform tests.""" + TERRAFORM_DIR: str def setup_method(self) -> None: diff --git a/dev/tests_common/test_utils/timetables.py b/tests_common/test_utils/timetables.py similarity index 97% rename from dev/tests_common/test_utils/timetables.py rename to tests_common/test_utils/timetables.py index 849968e76110a..f2053d83b24ac 100644 --- a/dev/tests_common/test_utils/timetables.py +++ b/tests_common/test_utils/timetables.py @@ -30,6 +30,8 @@ def delta_timetable(delta) -> DeltaDataIntervalTimetable: class CustomSerializationTimetable(Timetable): + """Custom timetable for testing serialization.""" + def __init__(self, value: str): self.value = value diff --git a/dev/tests_common/test_utils/watcher.py b/tests_common/test_utils/watcher.py similarity index 86% rename from dev/tests_common/test_utils/watcher.py rename to tests_common/test_utils/watcher.py index 4ee2e2e665006..6c6402cc6bd38 100644 --- a/dev/tests_common/test_utils/watcher.py +++ b/tests_common/test_utils/watcher.py @@ -23,6 +23,10 @@ @task(trigger_rule=TriggerRule.ONE_FAILED, retries=0) def watcher(): - """Watcher task raises an AirflowException and is used to 'watch' tasks for failures - and propagates fail status to the whole DAG Run""" + """ + Watcher task. + + Watcher task raises an AirflowException and is used to 'watch' tasks for failures + and propagates fail status to the whole DAG Run. + """ raise AirflowException("Failing task because one or more upstream tasks failed.") diff --git a/dev/tests_common/test_utils/www.py b/tests_common/test_utils/www.py similarity index 100% rename from dev/tests_common/test_utils/www.py rename to tests_common/test_utils/www.py