Skip to content

Commit

Permalink
PYTHON-3800 Add test for SRV URI with uppercase hostname (#1293)
Browse files Browse the repository at this point in the history
(cherry picked from commit 1d7f2ea)
  • Loading branch information
ShaneHarvey committed Jul 7, 2023
1 parent c7432db commit fb7e522
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion test/test_dns.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

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

from test import client_context, unittest
from test import IntegrationTest, client_context, unittest
from test.utils import wait_until

from pymongo.common import validate_read_preference_tags
Expand Down Expand Up @@ -186,5 +186,13 @@ def test_invalid_host(self):
)


class TestCaseInsensitive(IntegrationTest):
@unittest.skipUnless(_HAVE_DNSPYTHON, "DNS tests require the dnspython module")
def test_connect_case_insensitive(self):
client = MongoClient("mongodb+srv://TEST1.TEST.BUILD.10GEN.cc/")
self.addCleanup(client.close)
self.assertGreater(len(client.topology_description.server_descriptions()), 1)


if __name__ == "__main__":
unittest.main()

0 comments on commit fb7e522

Please sign in to comment.