Skip to content

Commit fb7e522

Browse files
committed
PYTHON-3800 Add test for SRV URI with uppercase hostname (#1293)
(cherry picked from commit 1d7f2ea)
1 parent c7432db commit fb7e522

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

test/test_dns.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
sys.path[0:0] = [""]
2323

24-
from test import client_context, unittest
24+
from test import IntegrationTest, client_context, unittest
2525
from test.utils import wait_until
2626

2727
from pymongo.common import validate_read_preference_tags
@@ -186,5 +186,13 @@ def test_invalid_host(self):
186186
)
187187

188188

189+
class TestCaseInsensitive(IntegrationTest):
190+
@unittest.skipUnless(_HAVE_DNSPYTHON, "DNS tests require the dnspython module")
191+
def test_connect_case_insensitive(self):
192+
client = MongoClient("mongodb+srv://TEST1.TEST.BUILD.10GEN.cc/")
193+
self.addCleanup(client.close)
194+
self.assertGreater(len(client.topology_description.server_descriptions()), 1)
195+
196+
189197
if __name__ == "__main__":
190198
unittest.main()

0 commit comments

Comments
 (0)