Exemplo n.º 1
0
async def test_configured_devices(hass):
    """Test that configured devices works as expected."""
    result = config_flow.configured_devices(hass)

    assert not result

    entry = MockConfigEntry(domain=axis.DOMAIN,
                            data={axis.config_flow.CONF_MAC: '1234'})
    entry.add_to_hass(hass)

    result = config_flow.configured_devices(hass)

    assert len(result) == 1
Exemplo n.º 2
0
async def test_configured_devices(hass):
    """Test that configured devices works as expected."""
    result = config_flow.configured_devices(hass)

    assert not result

    entry = MockConfigEntry(domain=axis.DOMAIN,
                            data={axis.CONF_DEVICE: {axis.CONF_HOST: ''}})
    entry.add_to_hass(hass)

    result = config_flow.configured_devices(hass)

    assert len(result) == 1