You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2020/08/17 15:22:26 UTC

[GitHub] [airflow] coopergillan commented on a change in pull request #10353: Expand JenkinsJobTriggerOperator unit tests

coopergillan commented on a change in pull request #10353:
URL: https://github.com/apache/airflow/pull/10353#discussion_r471553941



##########
File path: tests/providers/jenkins/operators/test_jenkins_job_trigger.py
##########
@@ -20,15 +20,23 @@
 
 import jenkins
 import mock
+from parameterized import parameterized
 
 from airflow.exceptions import AirflowException
 from airflow.providers.jenkins.hooks.jenkins import JenkinsHook
 from airflow.providers.jenkins.operators.jenkins_job_trigger import JenkinsJobTriggerOperator
 
+TEST_PARAMS = [
+    ({'a_param': 'blip', 'another_param': '42'},),
+    ('{"a_param": "blip", "another_param": "42"}',),
+    (['a_param', 'blip', 'another_param', '42'],),
+]
+
 
 class TestJenkinsOperator(unittest.TestCase):
+    @parameterized.expand(TEST_PARAMS)
     @unittest.skipIf(mock is None, 'mock package not present')
-    def test_execute(self):
+    def test_execute(self, the_parameters):

Review comment:
       Good call. Just pushed this and a few other changes up 😅




----------------------------------------------------------------
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:
users@infra.apache.org