Commit b441e5ff authored by Rob Connolly's avatar Rob Connolly

Start out getting appdaemontestframework up and running.

parent 3275a120
......@@ -14,4 +14,6 @@ www/community/
script-env/
broadlink-env/
shell_commands/__pycache__/
apps/__pycache__/
__pycache__/
ip_bans.yaml
import pytest
from appdaemontestframework import automation_fixture
from apps.motion_lights import MotionLight
@automation_fixture(MotionLight)
def motion_light(given_that):
given_that.passed_arg("motion_sensor").is_set_to("binary_sensor.motion")
given_that.passed_arg("light").is_set_to("light.test_light")
given_that.passed_arg("timeout").is_set_to(120)
def test_working(given_that, motion_light, assert_that):
assert(True)
import pytest
from appdaemontestframework import patch_hass, AssertThatWrapper, GivenThatWrapper, TimeTravelWrapper
@pytest.fixture
def hass_functions():
patched_hass_functions, unpatch_callback = patch_hass()
yield patched_hass_functions
unpatch_callback()
@pytest.fixture
def given_that(hass_functions):
return GivenThatWrapper(hass_functions)
@pytest.fixture
def assert_that(hass_functions):
return AssertThatWrapper(hass_functions)
@pytest.fixture
def time_travel(hass_functions):
return TimeTravelWrapper(hass_functions)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment