def test_loading(self): """Test loading a YAML configuration file.""" config = Config() config.load(os.path.join(EXAMPLE_CONFIG_DIR, "Debian-unstable.yaml")) self.assertEqual( config, { "mmdebstrap": { "keyrings": ["/usr/share/keyrings/debian-archive-keyring.gpg"], "mode": "unshare", "suite": "unstable", "target": "root.tar.xz", "variant": "minbase", } }, )
def test_commented_packages(): """Test commented-packages.yaml file.""" config = Config() config.load(os.path.join(TEST_CONFIG_DIR, "commented-packages.yaml")) config.sanitize_packages() config.check()
def test_check_example(): """Test example unstable.yaml file.""" config = Config() config.load(os.path.join(EXAMPLE_CONFIG_DIR, "Debian-unstable.yaml")) config["name"] = "Debian-unstable" config.check()