mirror of
https://github.com/python-kasa/python-kasa.git
synced 2025-12-24 05:30:15 +00:00
Remove async magic patch from tests (#1146)
Not required since AsyncMock available in python 3.8 and probably better to keep magic to a minimum.
This commit is contained in:
@@ -7,7 +7,7 @@ import inspect
|
||||
import pkgutil
|
||||
import sys
|
||||
from contextlib import AbstractContextManager
|
||||
from unittest.mock import Mock, patch
|
||||
from unittest.mock import AsyncMock, patch
|
||||
|
||||
import pytest
|
||||
|
||||
@@ -85,7 +85,7 @@ async def test_create_device_with_timeout():
|
||||
|
||||
async def test_create_thin_wrapper():
|
||||
"""Make sure thin wrapper is created with the correct device type."""
|
||||
mock = Mock()
|
||||
mock = AsyncMock()
|
||||
config = DeviceConfig(
|
||||
host="test_host",
|
||||
port_override=1234,
|
||||
@@ -281,7 +281,7 @@ async def test_device_type_aliases():
|
||||
"""Test that the device type aliases in Device work."""
|
||||
|
||||
def _mock_connect(config, *args, **kwargs):
|
||||
mock = Mock()
|
||||
mock = AsyncMock()
|
||||
mock.config = config
|
||||
return mock
|
||||
|
||||
|
||||
Reference in New Issue
Block a user