mirror of
https://github.com/python-kasa/python-kasa.git
synced 2025-08-09 20:24:02 +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:
@@ -140,14 +140,3 @@ def mock_datagram_endpoint(request): # noqa: PT004
|
||||
side_effect=_create_datagram_endpoint,
|
||||
):
|
||||
yield
|
||||
|
||||
|
||||
# allow mocks to be awaited
|
||||
# https://stackoverflow.com/questions/51394411/python-object-magicmock-cant-be-used-in-await-expression/51399767#51399767
|
||||
|
||||
|
||||
async def async_magic():
|
||||
pass
|
||||
|
||||
|
||||
MagicMock.__await__ = lambda x: async_magic().__await__()
|
||||
|
Reference in New Issue
Block a user