File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 1
1
"""Test communicating with a devolo device."""
2
2
3
- from asyncio import AbstractEventLoop
3
+ from asyncio import get_event_loop
4
4
from unittest .mock import AsyncMock , Mock , patch
5
5
6
6
import pytest
@@ -104,10 +104,10 @@ async def test_async_disconnect(self, mock_device: Device):
104
104
assert mock_device ._session .aclose .call_count == 0 # type: ignore[attr-defined]
105
105
assert not mock_device ._connected
106
106
107
- def test_disconnect (self , mock_device : Device , event_loop : AbstractEventLoop ):
107
+ def test_disconnect (self , mock_device : Device ):
108
108
"""Test that the sync disconnect method just calls the async disconnect method."""
109
109
with patch ("devolo_plc_api.device.Device.async_disconnect" , new = AsyncMock ()) as ad :
110
- mock_device ._loop = event_loop
110
+ mock_device ._loop = get_event_loop ()
111
111
mock_device .disconnect ()
112
112
assert ad .call_count == 1
113
113
You can’t perform that action at this time.
0 commit comments