Skip to content

Commit 63676b6

Browse files
committed
fix patch string
1 parent 2900718 commit 63676b6

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

test/test_client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -600,7 +600,7 @@ def test_validate_suggestion(self):
600600
with self.assertRaisesRegex(ConfigurationError, expected):
601601
MongoClient(**{typo: "standard"}) # type: ignore[arg-type]
602602

603-
@patch("pymongo.srv_resolver._SrvResolver.get_hosts")
603+
@patch("pymongo.synchronous.srv_resolver._SrvResolver.get_hosts")
604604
def test_detected_environment_logging(self, mock_get_hosts):
605605
normal_hosts = [
606606
"normal.host.com",
@@ -622,7 +622,7 @@ def test_detected_environment_logging(self, mock_get_hosts):
622622
logs = [record.getMessage() for record in cm.records if record.name == "pymongo.client"]
623623
self.assertEqual(len(logs), 7)
624624

625-
@patch("pymongo.srv_resolver._SrvResolver.get_hosts")
625+
@patch("pymongo.synchronous.srv_resolver._SrvResolver.get_hosts")
626626
def test_detected_environment_warning(self, mock_get_hosts):
627627
with self._caplog.at_level(logging.WARN):
628628
normal_hosts = [

tools/synchro.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@
127127
"async_create_barrier": "create_barrier",
128128
"async_barrier_wait": "barrier_wait",
129129
"async_joinall": "joinall",
130+
"pymongo.asynchronous.srv_resolver._SrvResolver.get_hosts": "pymongo.synchronous.srv_resolver._SrvResolver.get_hosts",
130131
}
131132

132133
docstring_replacements: dict[tuple[str, str], str] = {

0 commit comments

Comments
 (0)