mirror of
https://github.com/home-assistant/core.git
synced 2025-12-24 21:06:19 +00:00
Attempt to fix CI (#34800)
This commit is contained in:
@@ -28,11 +28,15 @@ from tests.common import (
|
||||
get_test_home_assistant,
|
||||
mock_coro,
|
||||
mock_registry,
|
||||
mock_storage,
|
||||
)
|
||||
from tests.mock.zwave import MockEntityValues, MockNetwork, MockNode, MockValue
|
||||
|
||||
|
||||
@pytest.fixture(autouse=True)
|
||||
def mock_storage(hass_storage):
|
||||
"""Autouse hass_storage for the TestCase tests."""
|
||||
|
||||
|
||||
async def test_valid_device_config(hass, mock_openzwave):
|
||||
"""Test valid device config."""
|
||||
device_config = {"light.kitchen": {"ignored": "true"}}
|
||||
@@ -829,8 +833,6 @@ class TestZWaveDeviceEntityValues(unittest.TestCase):
|
||||
def setUp(self):
|
||||
"""Initialize values for this testcase class."""
|
||||
self.hass = get_test_home_assistant()
|
||||
self.mock_storage = mock_storage()
|
||||
self.mock_storage.__enter__()
|
||||
self.hass.start()
|
||||
self.registry = mock_registry(self.hass)
|
||||
|
||||
@@ -866,7 +868,6 @@ class TestZWaveDeviceEntityValues(unittest.TestCase):
|
||||
def tearDown(self): # pylint: disable=invalid-name
|
||||
"""Stop everything that was started."""
|
||||
self.hass.stop()
|
||||
self.mock_storage.__exit__(None, None, None)
|
||||
|
||||
@patch.object(zwave, "import_module")
|
||||
@patch.object(zwave, "discovery")
|
||||
@@ -1199,8 +1200,6 @@ class TestZWaveServices(unittest.TestCase):
|
||||
def setUp(self):
|
||||
"""Initialize values for this testcase class."""
|
||||
self.hass = get_test_home_assistant()
|
||||
self.mock_storage = mock_storage()
|
||||
self.mock_storage.__enter__()
|
||||
self.hass.start()
|
||||
|
||||
# Initialize zwave
|
||||
@@ -1216,7 +1215,6 @@ class TestZWaveServices(unittest.TestCase):
|
||||
self.hass.services.call("zwave", "stop_network", {})
|
||||
self.hass.block_till_done()
|
||||
self.hass.stop()
|
||||
self.mock_storage.__exit__(None, None, None)
|
||||
|
||||
def test_add_node(self):
|
||||
"""Test zwave add_node service."""
|
||||
|
||||
Reference in New Issue
Block a user