File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11"""Test communicating with a devolo device."""
22
3- from asyncio import AbstractEventLoop
3+ from asyncio import get_event_loop
44from unittest .mock import AsyncMock , Mock , patch
55
66import pytest
@@ -104,10 +104,10 @@ async def test_async_disconnect(self, mock_device: Device):
104104 assert mock_device ._session .aclose .call_count == 0 # type: ignore[attr-defined]
105105 assert not mock_device ._connected
106106
107- def test_disconnect (self , mock_device : Device , event_loop : AbstractEventLoop ):
107+ def test_disconnect (self , mock_device : Device ):
108108 """Test that the sync disconnect method just calls the async disconnect method."""
109109 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 ()
111111 mock_device .disconnect ()
112112 assert ad .call_count == 1
113113
You can’t perform that action at this time.
0 commit comments