potiuk commented on a change in pull request #16686:
URL: https://github.com/apache/airflow/pull/16686#discussion_r660036759



##########
File path: tests/models/test_taskinstance.py
##########
@@ -1547,6 +1550,47 @@ def test_pendulum_template_dates(self):
         assert isinstance(template_context["next_execution_date"], 
pendulum.DateTime)
         assert isinstance(template_context["prev_execution_date"], 
pendulum.DateTime)
 
+    @parameterized.expand(
+        [
+            ('{{ conn.get("a_connection").host }}', 'hostvalue'),
+            ('{{ conn.get("a_connection", "unused_fallback").host }}', 
'hostvalue'),
+            ('{{ conn.get("missing_connection", {"host": 
"fallback_host"}).host }}', 'fallback_host'),
+            ('{{ conn.a_connection.host }}', 'hostvalue'),
+            ('{{ conn.a_connection.login }}', 'loginvalue'),
+            ('{{ conn.a_connection.password }}', 'passwordvalue'),
+            ('{{ conn.a_connection.extra_dejson["extra__asana__workspace"] 
}}', 'extra1'),
+        ]
+    )
+    def test_template_with_connection(self, content, expected_output):

Review comment:
       It's covered already by the unit tests of the methods used 
`get_connection_from_secrets`. There is no need to repeat those.




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