mik-laj commented on a change in pull request #4591: [AIRFLOW-3615] Parse
hostname using netloc
URL: https://github.com/apache/airflow/pull/4591#discussion_r255036207
##########
File path: tests/models.py
##########
@@ -3392,6 +3392,26 @@ def test_connection_from_uri_no_schema(self):
self.assertEqual(connection.password, 'password with space')
self.assertEqual(connection.port, 1234)
+ def test_connection_from_uri_without_authinfo(self):
+ uri = 'scheme://host:1234'
+ connection = Connection(uri=uri)
+ self.assertEqual(connection.conn_type, 'scheme')
+ self.assertEqual(connection.host, 'host')
+ self.assertEqual(connection.schema, '')
+ self.assertEqual(connection.login, None)
+ self.assertEqual(connection.password, None)
+ self.assertEqual(connection.port, 1234)
Review comment:
This is an additional test not directly related to the issues, but I think
it is worth adding it to prevent regression.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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