Ejemplo n.º 1
0
def test_process_failed() -> None:
    try:
        result = process_lights({MOCK}, 'failed')

        assert result[0]['consumer'] == 'xiaomi_yeelight'
        assert result[0]['type'] == 'light'
        assert result[0]['name']
        assert result[0]['status'] == 'failed'
    except:
        pytest.skip()
Ejemplo n.º 2
0
def test_process_passed():
    try:
        result = process_lights('passed', {MOCK})

        assert result[0]['consumer'] == 'xiaomi_yeelight'
        assert result[0]['type'] == 'light'
        assert result[0]['name']
        assert result[0]['status'] == 'passed'
    except SystemExit:
        pytest.skip()