Use built-in test helpers on 3.8 (#34901)
This commit is contained in:
1 parent
6b16c34fd0
commit
ec47216388
303 files changed
+1163
-1320
No files matched your search
@@ -3,9 +3,10 @@ import datetime
|
||||
from unittest import mock
|
||||
|
||||
from aiohomekit.testing import FakeController
|
||||
import asynctest
|
||||
import pytest
|
||||
|
||||
import tests.async_mock
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def utcnow(request):
|
||||
@@ -20,5 +21,5 @@ def utcnow(request):
|
||||
def controller(hass):
|
||||
"""Replace aiohomekit.Controller with an instance of aiohomekit.testing.FakeController."""
|
||||
instance = FakeController()
|
||||
with asynctest.patch("aiohomekit.Controller", return_value=instance):
|
||||
with tests.async_mock.patch("aiohomekit.Controller", return_value=instance):
|
||||
yield instance
|
||||
Reference in new issue
Block a user