mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-07-09 10:16:29 +00:00
parent
e406aa4144
commit
53fa8e48c0
@ -40,6 +40,7 @@ def sys_machine():
|
||||
|
||||
@pytest.fixture
|
||||
def sys_supervisor():
|
||||
"""Mock sys_supervisor."""
|
||||
with patch(
|
||||
"supervisor.coresys.CoreSys.supervisor", new_callable=PropertyMock
|
||||
) as mock:
|
||||
|
@ -4,8 +4,8 @@ from unittest.mock import patch
|
||||
import pytest
|
||||
|
||||
|
||||
@pytest.fixture(autouse=True)
|
||||
def mock_detect_cpu():
|
||||
@pytest.fixture(name="mock_detect_cpu", autouse=True)
|
||||
def mock_detect_cpu_fixture():
|
||||
"""Mock cpu detection."""
|
||||
with patch("platform.machine") as detect_mock:
|
||||
detect_mock.return_value = "Unknown"
|
||||
|
@ -1,14 +1,13 @@
|
||||
"""Test Tarfile functions."""
|
||||
|
||||
import attr
|
||||
import pytest
|
||||
|
||||
from supervisor.utils.tar import secure_path, exclude_filter
|
||||
|
||||
|
||||
@attr.s
|
||||
class TarInfo:
|
||||
"""Fake TarInfo"""
|
||||
"""Fake TarInfo."""
|
||||
|
||||
name: str = attr.ib()
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user