Delint tests (#1720)

* Delint tarfile test

* Delint tests
This commit is contained in:
Martin Hjelmare
2020-05-11 20:41:09 +02:00
committed by GitHub
parent e406aa4144
commit 53fa8e48c0
3 changed files with 4 additions and 4 deletions

View File

@@ -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:

View File

@@ -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"

View File

@@ -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()