Пример #1
0
    def test_master_task_entries(self, mock_master_seeds):
        def side_effect():
            yield "required"
            yield "minimal"

        self.write_ubuntu_structure()
        output = GerminateOutput(self.config, self.temp_dir)
        self.config["DIST"] = "raring"
        mock_master_seeds.side_effect = side_effect
        self.assertEqual([
            "#include <ubuntu/raring/required>",
            "#include <ubuntu/raring/minimal>",
        ], list(output.master_task_entries("ubuntu")))
Пример #2
0
 def test_master_task_entries_no_seeds(self, mock_master_seeds):
     self.write_ubuntu_structure()
     output = GerminateOutput(self.config, self.temp_dir)
     self.config["DIST"] = "raring"
     self.assertRaises(
         NoMasterSeeds, list, output.master_task_entries("ubuntu"))