Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
aclark4life committed Dec 6, 2024
1 parent 3549729 commit 5d6c38e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/utils_/test_parse_uri.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,3 +77,8 @@ def test_invalid_credentials(self):
def test_no_prefix(self):
with self.assertRaises(pymongo.errors.InvalidURI):
parse_uri("cluster0.example.mongodb.net/myDatabase")

def test_hosts_without_ports(self):
settings_dict = parse_uri("mongodb://host1.net,host2.net/myDatabase")
self.assertEqual(settings_dict["HOST"], "host1.net:27017,host2.net:27017")
self.assertEqual(settings_dict["PORT"], None)

0 comments on commit 5d6c38e

Please sign in to comment.