Skip to content

Commit 118810e

Browse files
committed
PYTHON-4575 Remove hostname length check
1 parent 4cad3d7 commit 118810e

File tree

2 files changed

+0
-12
lines changed

2 files changed

+0
-12
lines changed

test/asynchronous/test_dns.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -186,12 +186,6 @@ def create_tests(cls):
186186

187187
class TestParsingErrors(AsyncPyMongoTestCase):
188188
async def test_invalid_host(self):
189-
with self.assertRaisesRegex(ConfigurationError, "Invalid URI host: mongodb is not"):
190-
client = self.simple_client("mongodb+srv://mongodb")
191-
await client.aconnect()
192-
with self.assertRaisesRegex(ConfigurationError, "Invalid URI host: mongodb.com is not"):
193-
client = self.simple_client("mongodb+srv://mongodb.com")
194-
await client.aconnect()
195189
with self.assertRaisesRegex(ConfigurationError, "Invalid URI host: an IP address is not"):
196190
client = self.simple_client("mongodb+srv://127.0.0.1")
197191
await client.aconnect()

test/test_dns.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -184,12 +184,6 @@ def create_tests(cls):
184184

185185
class TestParsingErrors(PyMongoTestCase):
186186
def test_invalid_host(self):
187-
with self.assertRaisesRegex(ConfigurationError, "Invalid URI host: mongodb is not"):
188-
client = self.simple_client("mongodb+srv://mongodb")
189-
client._connect()
190-
with self.assertRaisesRegex(ConfigurationError, "Invalid URI host: mongodb.com is not"):
191-
client = self.simple_client("mongodb+srv://mongodb.com")
192-
client._connect()
193187
with self.assertRaisesRegex(ConfigurationError, "Invalid URI host: an IP address is not"):
194188
client = self.simple_client("mongodb+srv://127.0.0.1")
195189
client._connect()

0 commit comments

Comments
 (0)