1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57
|
Description: Skip the tests that require network access
Author: Salvo 'LtWorf' Tomaselli <ltworf@debian.org>
Forwarded: no
Last-Update: 2024-10-14
--- pymongo-4.10.1.orig/test/asynchronous/test_client.py
+++ pymongo-4.10.1/test/asynchronous/test_client.py
@@ -516,6 +516,7 @@ class AsyncClientUnitTest(AsyncUnitTest)
self.assertEqual(clopts.replica_set_name, "newname")
self.assertEqual(clopts.read_preference, ReadPreference.SECONDARY_PREFERRED)
+ @unittest.skip("no connection")
async def test_connection_timeout_ms_propagates_to_DNS_resolver(self):
# Patch the resolver.
from pymongo.srv_resolver import _resolve
@@ -613,6 +614,7 @@ class AsyncClientUnitTest(AsyncUnitTest)
with self.assertRaisesRegex(ConfigurationError, expected):
AsyncMongoClient(**{typo: "standard"}) # type: ignore[arg-type]
+ @unittest.skip("no connection")
@patch("pymongo.srv_resolver._SrvResolver.get_hosts")
def test_detected_environment_logging(self, mock_get_hosts):
normal_hosts = [
@@ -635,6 +637,7 @@ class AsyncClientUnitTest(AsyncUnitTest)
logs = [record.getMessage() for record in cm.records if record.name == "pymongo.client"]
self.assertEqual(len(logs), 7)
+ @unittest.skip("no connection")
@patch("pymongo.srv_resolver._SrvResolver.get_hosts")
async def test_detected_environment_warning(self, mock_get_hosts):
with self._caplog.at_level(logging.WARN):
--- pymongo-4.10.1.orig/test/test_client.py
+++ pymongo-4.10.1/test/test_client.py
@@ -508,6 +508,7 @@ class ClientUnitTest(UnitTest):
self.assertEqual(clopts.replica_set_name, "newname")
self.assertEqual(clopts.read_preference, ReadPreference.SECONDARY_PREFERRED)
+ @unittest.skip("no connection")
def test_connection_timeout_ms_propagates_to_DNS_resolver(self):
# Patch the resolver.
from pymongo.srv_resolver import _resolve
@@ -605,6 +606,7 @@ class ClientUnitTest(UnitTest):
with self.assertRaisesRegex(ConfigurationError, expected):
MongoClient(**{typo: "standard"}) # type: ignore[arg-type]
+ @unittest.skip("no connection")
@patch("pymongo.srv_resolver._SrvResolver.get_hosts")
def test_detected_environment_logging(self, mock_get_hosts):
normal_hosts = [
@@ -627,6 +629,7 @@ class ClientUnitTest(UnitTest):
logs = [record.getMessage() for record in cm.records if record.name == "pymongo.client"]
self.assertEqual(len(logs), 7)
+ @unittest.skip("no connection")
@patch("pymongo.srv_resolver._SrvResolver.get_hosts")
def test_detected_environment_warning(self, mock_get_hosts):
with self._caplog.at_level(logging.WARN):
|