Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,8 @@
DEFAULT_DATE_ISO = DEFAULT_DATE.isoformat()
DEFAULT_DATE_DS = DEFAULT_DATE_ISO[:10]

pytestmark = pytest.mark.db_test


@pytest.mark.db_test
class TestNamedHivePartitionSensor:
def setup_method(self):
args = {"owner": "airflow", "start_date": DEFAULT_DATE}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
logger = logging.getLogger(__name__)


@pytest.mark.db_test
class TestS3ToHiveTransfer:
@pytest.fixture(autouse=True)
def setup_attrs(self):
Expand Down Expand Up @@ -196,6 +195,7 @@ def test__delete_top_row_and_compress(self):
fn_bz2 = self._get_fn(".bz2", False)
assert self._check_file_equality(bz2_txt_nh, fn_bz2, ".bz2"), "bz2 Compressed file not as expected"

@pytest.mark.db_test
@mock.patch("airflow.providers.apache.hive.transfers.s3_to_hive.HiveCliHook")
@moto.mock_aws
def test_execute(self, mock_hiveclihook):
Expand Down Expand Up @@ -229,6 +229,7 @@ def test_execute(self, mock_hiveclihook):
s32hive = S3ToHiveOperator(**self.kwargs)
s32hive.execute(None)

@pytest.mark.db_test
@mock.patch("airflow.providers.apache.hive.transfers.s3_to_hive.HiveCliHook")
@moto.mock_aws
def test_execute_with_select_expression(self, mock_hiveclihook):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@
from airflow.models.dag import DAG
from airflow.providers.apache.hive.transfers.vertica_to_hive import VerticaToHiveOperator

pytestmark = pytest.mark.db_test


def mock_get_conn():
commit_mock = mock.MagicMock()
Expand All @@ -48,6 +46,7 @@ def setup_method(self):
args = {"owner": "airflow", "start_date": datetime.datetime(2017, 1, 1)}
self.dag = DAG("test_dag_id", schedule=None, default_args=args)

@pytest.mark.db_test
@mock.patch(
"airflow.providers.apache.hive.transfers.vertica_to_hive.VerticaHook.get_conn",
side_effect=mock_get_conn,
Expand Down