Ejemplo n.º 1
0
 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",
             }
         },
     )
Ejemplo n.º 2
0
 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()
Ejemplo n.º 3
0
 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()