dstandish commented on code in PR #26765:
URL: https://github.com/apache/airflow/pull/26765#discussion_r984748965
##########
tests/always/test_connection.py:
##########
@@ -737,3 +737,6 @@ def test_extra_warnings_non_json(self):
def test_extra_warnings_non_dict_json(self):
with pytest.warns(DeprecationWarning, match='not parse as a
dictionary'):
Connection(conn_id='test_extra', conn_type='none', extra='"hi"')
+
+ def test_get_uri_no_conn_type(self):
+ assert Connection().get_uri() == 'none://'
Review Comment:
this is not a useful URI of course...
i could have written the test as `Connection(host='blah',
login='blah').get_uri() == 'none://blah@blah'` and the objection would not
apply. but, these other attrs have nothing to do with the test. we're merely
verifying that the URI generation doesn't fail and `none` is the scheme.
the point here is, if you just want to generate a URI for an airflow
connection, let's make it easy. airflow doesn't care whether your uri is
`none://blah@blah` or `abc://blah@blah` -- it will still work when you set that
conn in env vars or secrets backend.
--
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]