Skip to content

Commit

Permalink
Add test case
Browse files Browse the repository at this point in the history
  • Loading branch information
ecerulm committed Jun 29, 2021
1 parent 5ae647f commit a535dd0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion airflow/models/taskinstance.py
Expand Up @@ -1643,7 +1643,7 @@ class ConnectionAccessor:
"""
Wrapper around Connection. This way you can get connections in
templates by using ``{{ conn.conn_id }}`` or
``{{ conn.get('conn_id', 'fallback') }}``.
``{{ conn.get('conn_id') }}``.
"""

def __getattr__(
Expand Down
1 change: 1 addition & 0 deletions tests/models/test_taskinstance.py
Expand Up @@ -1565,6 +1565,7 @@ def test_pendulum_template_dates(self):
('{{ conn.a_connection.login }}', 'loginvalue'),
('{{ conn.a_connection.password }}', 'passwordvalue'),
('{{ conn.a_connection.extra_dejson["extra__asana__workspace"] }}', 'extra1'),
('{{ conn.a_connection.extra_dejson.extra__asana__workspace }}', 'extra1'),
]
)
def test_template_with_connection(self, content, expected_output):
Expand Down

0 comments on commit a535dd0

Please sign in to comment.