File tree 2 files changed +7
-3
lines changed
Filter options
2 files changed +7
-3
lines changed
Original file line number Diff line number Diff line change @@ -8,7 +8,6 @@ from ._protocol.outgoing cimport DNSOutgoing
8
8
9
9
10
10
cdef object RecordUpdate
11
- cdef object _DNS_PTR_MIN_TTL
12
11
13
12
cdef class QueryHandler:
14
13
Original file line number Diff line number Diff line change 16
16
from typing import Set , cast
17
17
from unittest .mock import patch
18
18
19
+ try :
20
+ from unittest .mock import AsyncMock
21
+ except ImportError :
22
+ from unittest .mock import Mock as AsyncMock # type: ignore[misc]
23
+
19
24
import pytest
20
25
21
26
import zeroconf as r
@@ -818,8 +823,8 @@ def _background_register():
818
823
@pytest .mark .asyncio
819
824
@unittest .skipIf (sys .version_info [:3 ][1 ] < 8 , 'Requires Python 3.8 or later to patch _async_setup' )
820
825
@patch ("zeroconf._core._STARTUP_TIMEOUT" , 0 )
821
- @patch ("zeroconf._core.AsyncEngine._async_setup" )
822
- async def test_event_loop_blocked (mock_start ):
826
+ @patch ("zeroconf._core.AsyncEngine._async_setup" , AsyncMock () )
827
+ async def test_event_loop_blocked ():
823
828
"""Test we raise NotRunningException when waiting for startup that times out."""
824
829
aiozc = AsyncZeroconf (interfaces = ['127.0.0.1' ])
825
830
with pytest .raises (NotRunningException ):
You can’t perform that action at this time.
0 commit comments