Ejemplo n.º 1
0
    def test_04_commit_recipe_file(self):
        """Test committing a TOML file"""
        recipe_path = joinpaths(self.results_path, "full-recipe.toml")
        oid = recipes.commit_recipe_file(self.repo, "master", recipe_path)
        self.assertNotEqual(oid, None)

        commits = recipes.list_commits(self.repo, "master", "http-server.toml")
        self.assertEqual(len(commits), 1, "Wrong number of commits: %s" % commits)
Ejemplo n.º 2
0
 def test_04_commit_recipe_file_handles_internal_ioerror(self):
     """Test committing a TOML raises RecipeFileError on internal IOError"""
     recipe_path = joinpaths(self.results_path, "non-existing-file.toml")
     with self.assertRaises(recipes.RecipeFileError):
         recipes.commit_recipe_file(self.repo, "master", recipe_path)