Fix py38 tests (#34658)
This commit is contained in:
1 parent
40d3d64027
commit
9a4a83cb91
7 files changed
+92
-124
No files matched your search
@@ -0,0 +1,22 @@
|
||||
"""Test configuration for PS4."""
|
||||
from asynctest import patch
|
||||
import pytest
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def patch_load_json():
|
||||
"""Prevent load JSON being used."""
|
||||
with patch("homeassistant.components.ps4.load_json", return_value={}) as mock_load:
|
||||
yield mock_load
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def patch_save_json():
|
||||
"""Prevent save JSON being used."""
|
||||
with patch("homeassistant.components.ps4.save_json") as mock_save:
|
||||
yield mock_save
|
||||
|
||||
|
||||
@pytest.fixture(autouse=True)
|
||||
def patch_io(patch_load_json, patch_save_json):
|
||||
"""Prevent PS4 doing I/O."""
|
||||
Reference in new issue
Block a user