Add tests for vera component (#28340)
* Adding tests for vera component. Fixing update bug in the vera climate platform. * Updating requrements file. * Moving vera stop to a job. Sorting imports. * Addressing simple PR feedback. * Splitting tests into platforms. * Mocking controller instead of using requests_mock. * Updating pyvera to use version that stops threads quickly. * Updating requirements files. * Mocking the pyvera module, not the API. * Addressing PR feedback. Handling start/stop of patch in fixture. Removing unecessary code. * Using generator
This commit is contained in:
1 parent
076e0273a2
commit
e577f047f7
17 files changed
+831
-3
No files matched your search
@@ -0,0 +1,13 @@
|
||||
"""Fixtures for tests."""
|
||||
|
||||
from mock import patch
|
||||
import pytest
|
||||
|
||||
from .common import ComponentFactory
|
||||
|
||||
|
||||
@pytest.fixture()
|
||||
def vera_component_factory():
|
||||
"""Return a factory for initializing the vera component."""
|
||||
with patch("pyvera.init_controller") as init_controller_mock:
|
||||
yield ComponentFactory(init_controller_mock)
|
||||
Reference in new issue
Block a user