Ejemplo n.º 1
0
async def test_not_connected(hass, monkeypatch):
    """Test Error when sending commands to a disconnected device."""
    import pytest
    from homeassistant.core import HomeAssistantError

    test_device = RflinkCommand("DUMMY_DEVICE")
    RflinkCommand.set_rflink_protocol(None)
    with pytest.raises(HomeAssistantError):
        await test_device._async_handle_command("turn_on")
Ejemplo n.º 2
0
async def test_not_connected(hass, monkeypatch):
    """Test Error when sending commands to a disconnected device."""
    import pytest
    from homeassistant.core import HomeAssistantError

    test_device = RflinkCommand('DUMMY_DEVICE')
    RflinkCommand.set_rflink_protocol(None)
    with pytest.raises(HomeAssistantError):
        await test_device._async_handle_command('turn_on')