Esempio n. 1
0
def test_get_command_names_with_base_definition(base_format_builder):
    server = CommandName("server")
    add = CommandName("add")

    base_format_builder.add_command_name(server)

    builder = ArgsFormatBuilder(base_format_builder.format)
    builder.add_command_name(add)

    assert [server, add] == builder.get_command_names()
    assert [add] == builder.get_command_names(False)
Esempio n. 2
0
def test_has_command_names_with_base_definition(base_format_builder):
    base_format_builder.add_command_name(CommandName("server"))

    builder = ArgsFormatBuilder(base_format_builder.format)

    assert builder.has_command_names()
    assert not builder.has_command_names(False)

    builder.add_command_name(CommandName("add"))

    assert builder.has_command_names()
    assert builder.has_command_names(False)