ferruzzi commented on code in PR #28039:
URL: https://github.com/apache/airflow/pull/28039#discussion_r1037539606
##########
tests/providers/amazon/aws/hooks/test_glue_crawler.py:
##########
@@ -83,18 +82,17 @@
}
-class TestGlueCrawlerHook(unittest.TestCase):
- @classmethod
- def setUp(cls):
- cls.hook = GlueCrawlerHook(aws_conn_id="aws_default")
+class TestGlueCrawlerHook:
+ def setup_method(self):
+ self.hook = GlueCrawlerHook(aws_conn_id="aws_default")
def test_init(self):
- self.assertEqual(self.hook.aws_conn_id, "aws_default")
+ assert self.hook.aws_conn_id == "aws_default"
@mock.patch.object(GlueCrawlerHook, "get_conn")
Review Comment:
(No change requested/required, just chatter) I mentioned on slack that I
had started on some of these; this was the rabbit hole that got me there... I
started updating any hooks that still used get_conn() instead of the conn
cached property, which led to updating the mocked values in the unit tests,
which led to converting them all to pytest which... never got finished :P So
again, thanks for taking this on!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]