Skip to content

Commit 8363e4a

Browse files
committed
adjust patch target
1 parent d5d9ab3 commit 8363e4a

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

tests/test_core.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,9 @@
1818
from unittest.mock import patch
1919

2020
import zeroconf as r
21-
from zeroconf import _core, _protocol, const, Zeroconf, current_time_millis
21+
from zeroconf import _core, const, Zeroconf, current_time_millis
2222
from zeroconf.asyncio import AsyncZeroconf
23+
from zeroconf._protocol import outgoing
2324

2425
from . import has_working_ipv6, _clear_cache, _inject_response, _wait_for_start
2526

@@ -670,8 +671,8 @@ def test_guard_against_oversized_packets():
670671
)
671672

672673
# We are patching to generate an oversized packet
673-
with patch.object(_protocol, "_MAX_MSG_ABSOLUTE", 100000), patch.object(
674-
_protocol, "_MAX_MSG_TYPICAL", 100000
674+
with patch.object(outgoing, "_MAX_MSG_ABSOLUTE", 100000), patch.object(
675+
outgoing, "_MAX_MSG_TYPICAL", 100000
675676
):
676677
over_sized_packet = generated.packets()[0]
677678
assert len(over_sized_packet) > const._MAX_MSG_ABSOLUTE

0 commit comments

Comments
 (0)