예제 #1
0
def test_config_nodes_absence(empty_config_file):
    with open(empty_config_file, "r") as main_file:
        parser = ConfigurationParser(main_file)
        assert not parser.has_bootstrap_node()
        with pytest.raises(FatalError) as error:
            parser.get_bootstrap_repository()
        assert "repository" in error.value.message
        with pytest.raises(FatalError) as error:
            parser.get_bootstrap_architecture()
        assert "architecture" in error.value.message
예제 #2
0
def test_config_nodes_presence(config_files):
    with open(config_files, "r") as main_file:
        parser = ConfigurationParser(main_file)
        assert parser.has_bootstrap_node()
        assert parser.get_bootstrap_repository()
        assert parser.get_bootstrap_architecture()