ferruzzi commented on a change in pull request #20305:
URL: https://github.com/apache/airflow/pull/20305#discussion_r769925194



##########
File path: tests/providers/amazon/aws/sensors/test_athena.py
##########
@@ -36,26 +36,26 @@ def setUp(self):
             aws_conn_id='aws_default',
         )
 
-    @mock.patch.object(AWSAthenaHook, 'poll_query_status', 
side_effect=("SUCCEEDED",))
+    @mock.patch.object(AthenaHook, 'poll_query_status', 
side_effect=("SUCCEEDED",))
     def test_poke_success(self, mock_poll_query_status):
-        assert self.sensor.poke(None)
+        assert self.sensor.poke({})
 
-    @mock.patch.object(AWSAthenaHook, 'poll_query_status', 
side_effect=("RUNNING",))
+    @mock.patch.object(AthenaHook, 'poll_query_status', 
side_effect=("RUNNING",))
     def test_poke_running(self, mock_poll_query_status):
-        assert not self.sensor.poke(None)
+        assert not self.sensor.poke({})
 
-    @mock.patch.object(AWSAthenaHook, 'poll_query_status', 
side_effect=("QUEUED",))
+    @mock.patch.object(AthenaHook, 'poll_query_status', 
side_effect=("QUEUED",))
     def test_poke_queued(self, mock_poll_query_status):
-        assert not self.sensor.poke(None)
+        assert not self.sensor.poke({})
 
-    @mock.patch.object(AWSAthenaHook, 'poll_query_status', 
side_effect=("FAILED",))
+    @mock.patch.object(AthenaHook, 'poll_query_status', 
side_effect=("FAILED",))
     def test_poke_failed(self, mock_poll_query_status):
         with pytest.raises(AirflowException) as ctx:
-            self.sensor.poke(None)
+            self.sensor.poke({})
         assert 'Athena sensor failed' in str(ctx.value)
 
-    @mock.patch.object(AWSAthenaHook, 'poll_query_status', 
side_effect=("CANCELLED",))
+    @mock.patch.object(AthenaHook, 'poll_query_status', 
side_effect=("CANCELLED",))
     def test_poke_cancelled(self, mock_poll_query_status):
         with pytest.raises(AirflowException) as ctx:
-            self.sensor.poke(None)
+            self.sensor.poke({})

Review comment:
       Yeah, sorry.   I'm really bad at that; I fix little things when I see 
them because I know I'll forget or won't get to it later.  IDE was throwing a 
type hint warning there, expecting a dict and got NoneType.  I'll add a comment 
to the description.




-- 
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]


Reply via email to