We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3549729 commit 5d6c38eCopy full SHA for 5d6c38e
tests/utils_/test_parse_uri.py
@@ -77,3 +77,8 @@ def test_invalid_credentials(self):
77
def test_no_prefix(self):
78
with self.assertRaises(pymongo.errors.InvalidURI):
79
parse_uri("cluster0.example.mongodb.net/myDatabase")
80
+
81
+ def test_hosts_without_ports(self):
82
+ settings_dict = parse_uri("mongodb://host1.net,host2.net/myDatabase")
83
+ self.assertEqual(settings_dict["HOST"], "host1.net:27017,host2.net:27017")
84
+ self.assertEqual(settings_dict["PORT"], None)
0 commit comments