You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by po...@apache.org on 2023/02/25 10:01:43 UTC

[airflow] branch main updated: Migrated tests/providers/amazon/aws to pytest (#29758)

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

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


The following commit(s) were added to refs/heads/main by this push:
     new 2dcca24610 Migrated tests/providers/amazon/aws to pytest (#29758)
2dcca24610 is described below

commit 2dcca246102741647153eca8ec0b36d8f3272a3a
Author: Abhishek-kumar-samsung <bi...@gmail.com>
AuthorDate: Sat Feb 25 15:31:34 2023 +0530

    Migrated tests/providers/amazon/aws to pytest (#29758)
---
 tests/providers/amazon/aws/operators/test_glacier.py        | 6 +++---
 tests/providers/amazon/aws/transfers/test_glacier_to_gcs.py | 4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/tests/providers/amazon/aws/operators/test_glacier.py b/tests/providers/amazon/aws/operators/test_glacier.py
index 08d64a0227..d9afe50511 100644
--- a/tests/providers/amazon/aws/operators/test_glacier.py
+++ b/tests/providers/amazon/aws/operators/test_glacier.py
@@ -17,7 +17,7 @@
 # under the License.
 from __future__ import annotations
 
-from unittest import TestCase, mock
+from unittest import mock
 
 from airflow.providers.amazon.aws.operators.glacier import (
     GlacierCreateJobOperator,
@@ -34,7 +34,7 @@ TASK_ID = "glacier_job"
 VAULT_NAME = "airflow"
 
 
-class TestGlacierCreateJobOperator(TestCase):
+class TestGlacierCreateJobOperator:
     @mock.patch("airflow.providers.amazon.aws.operators.glacier.GlacierHook")
     def test_execute(self, hook_mock):
         op = GlacierCreateJobOperator(aws_conn_id=AWS_CONN_ID, vault_name=VAULT_NAME, task_id=TASK_ID)
@@ -43,7 +43,7 @@ class TestGlacierCreateJobOperator(TestCase):
         hook_mock.return_value.retrieve_inventory.assert_called_once_with(vault_name=VAULT_NAME)
 
 
-class TestGlacierUploadArchiveOperator(TestCase):
+class TestGlacierUploadArchiveOperator:
     @mock.patch("airflow.providers.amazon.aws.operators.glacier.GlacierHook.get_conn")
     def test_execute(self, hook_mock):
         op = GlacierUploadArchiveOperator(
diff --git a/tests/providers/amazon/aws/transfers/test_glacier_to_gcs.py b/tests/providers/amazon/aws/transfers/test_glacier_to_gcs.py
index cc5a296e5a..f3f9756339 100644
--- a/tests/providers/amazon/aws/transfers/test_glacier_to_gcs.py
+++ b/tests/providers/amazon/aws/transfers/test_glacier_to_gcs.py
@@ -17,7 +17,7 @@
 # under the License.
 from __future__ import annotations
 
-from unittest import TestCase, mock
+from unittest import mock
 
 from airflow.providers.amazon.aws.transfers.glacier_to_gcs import GlacierToGCSOperator
 
@@ -31,7 +31,7 @@ TASK_ID = "glacier_job"
 VAULT_NAME = "airflow"
 
 
-class TestGlacierToGCSOperator(TestCase):
+class TestGlacierToGCSOperator:
     @mock.patch("airflow.providers.amazon.aws.transfers.glacier_to_gcs.GlacierHook")
     @mock.patch("airflow.providers.amazon.aws.transfers.glacier_to_gcs.GCSHook")
     @mock.patch("airflow.providers.amazon.aws.transfers.glacier_to_gcs.tempfile")