PYTHON-3800 Add test for SRV URI with uppercase hostname (#1293)

(cherry picked from commit 1d7f2ea1c8)
This commit is contained in:
Shane Harvey 2023-07-07 10:15:52 -04:00
parent c7432db957
commit fb7e522316

View File

@ -21,7 +21,7 @@ import sys
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
@ -186,5 +186,13 @@ class TestParsingErrors(unittest.TestCase):
)
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()