baolsen commented on a change in pull request #6773: [AIRFLOW-6038] AWS 
DataSync example_dags added
URL: https://github.com/apache/airflow/pull/6773#discussion_r359157628
 
 

 ##########
 File path: tests/providers/amazon/aws/operators/test_datasync.py
 ##########
 @@ -415,29 +464,42 @@ def test_get_many_tasks(self, mock_get_conn):
 
         self.client.create_task(
             SourceLocationArn=self.source_location_arn,
-            DestinationLocationArn=self.destination_location_arn
+            DestinationLocationArn=self.destination_location_arn,
         )
 
         # Check how many tasks and locations we have
         tasks = self.client.list_tasks()
-        self.assertEqual(len(tasks['Tasks']), 2)
+        self.assertEqual(len(tasks["Tasks"]), 2)
         locations = self.client.list_locations()
-        self.assertEqual(len(locations['Locations']), 2)
+        self.assertEqual(len(locations["Locations"]), 2)
 
         # Execute the task
-        result = self.datasync.execute(None)
-        self.assertIsNotNone(result)
-
-        task_arns = result
-        self.assertIsNotNone(task_arns)
-        self.assertTrue(task_arns)
-        self.assertEqual(len(task_arns), 2)
+        with self.assertRaises(AirflowException):
+            self.datasync.execute(None)
 
         # Assert 0 additional task and 0 additional locations
         tasks = self.client.list_tasks()
-        self.assertEqual(len(tasks['Tasks']), 2)
+        self.assertEqual(len(tasks["Tasks"]), 2)
 
 Review comment:
   I think it should be fine as-is; if its needed in future we can always split 
them up later.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to