Skip to content

Commit 6ec2d51

Browse files
committed
explain srv
1 parent 4d155ac commit 6ec2d51

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

tests/utils_/test_parse_uri.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ def test_no_database(self):
2828
self.assertIsNone(settings_dict["NAME"])
2929
self.assertEqual(settings_dict["HOST"], "cluster0.example.mongodb.net")
3030

31+
# PyMongo will try to resolve the SRV record if the URI has the mongodb+srv:// prefix.
32+
# https://pymongo.readthedocs.io/en/stable/api/pymongo/mongo_client.html#pymongo.mongo_client.MongoClient
3133
@patch("dns.resolver.resolve")
3234
def test_srv_uri_with_options(self, mock_resolver):
3335
settings_dict = parse_uri(URI)

0 commit comments

Comments
 (0)