예제 #1
0
def test_commands_loads(plugin) -> None:
    """Test plugin discovery."""
    hac = HomeAssistantCli()

    ctx = cli.make_context('hass-cli', ['info'])

    cmd = hac.get_command(ctx, plugin)

    assert cmd
def test_commands_loads(plugin) -> None:
    """Test plugin discovery."""
    hac = HomeAssistantCli()

    ctx = cli.make_context('hass-cli', ['info'])

    cmd = hac.get_command(ctx, plugin)

    assert cmd
예제 #3
0
def test_commands_match_expected(defaultplugins_sorted) -> None:
    """Test plugin discovery."""
    hac = HomeAssistantCli()

    ctx = cli.make_context('hass-cli', ['info'])

    cmds = hac.list_commands(ctx)

    cmds.sort()

    diff = set(cmds).difference(set(defaultplugins_sorted))

    assert not diff
def test_commands_match_expected(defaultplugins_sorted) -> None:
    """Test plugin discovery."""
    hac = HomeAssistantCli()

    ctx = cli.make_context('hass-cli', ['info'])

    cmds = hac.list_commands(ctx)

    cmds.sort()

    diff = set(cmds).difference(set(defaultplugins_sorted))

    assert not diff