1
0
mirror of https://github.com/home-assistant/supervisor.git synced 2025-12-24 12:29:08 +00:00

Support armv7 and allow support of multible arch types per CPU (#892)

* Support armv7 and first abstraction

* Change layout

* Add more type hints

* Fix imports

* Update

* move forward

* add tests

* fix type

* fix lint & tests

* fix tests

* Fix unittests

* Fix create folder

* cleanup

* Fix import order

* cleanup loop parameter

* cleanup init function

* Allow changeable image name

* fix setup

* Fix load of arch

* Fix lint

* Add typing

* fix init

* fix hassos cli problem & stick on supervisor arch

* address comments

* cleanup

* Fix image selfheal

* Add comment

* update uvloop

* remove uvloop

* fix tagging

* Fix install name

* Fix validate build config

* Abstract image_name from system cache
This commit is contained in:
Pascal Vizeli
2019-01-31 18:47:44 +01:00
committed by GitHub
parent 118a2e1951
commit 35aae69f23
33 changed files with 1019 additions and 457 deletions

42
tests/conftest.py Normal file
View File

@@ -0,0 +1,42 @@
"""Common test functions."""
from unittest.mock import patch, PropertyMock, MagicMock
import pytest
from hassio.bootstrap import initialize_coresys
# pylint: disable=redefined-outer-name
@pytest.fixture
def docker():
"""Mock Docker API."""
with patch('hassio.coresys.DockerAPI') as mock:
yield mock
@pytest.fixture
async def coresys(loop, docker):
"""Create a CoreSys Mock."""
with patch('hassio.bootstrap.initialize_system_data'):
coresys_obj = await initialize_coresys()
yield coresys_obj
@pytest.fixture
def sys_machine():
"""Mock sys_machine."""
with patch(
'hassio.coresys.CoreSys.machine',
new_callable=PropertyMock) as mock:
yield mock
@pytest.fixture
def sys_supervisor():
with patch(
'hassio.coresys.CoreSys.supervisor',
new_callable=PropertyMock) as mock:
mock.return_value = MagicMock()
yield MagicMock