def test_04_workspace_read_ioerror(self): """Test the workspace_read function dealing with internal IOError""" # The recipe was written by the workspace_write test. with self.assertRaises(recipes.RecipeFileError): with mock.patch('pylorax.api.workspace.recipe_from_toml', side_effect=IOError('TESTING')): workspace_read(self.repo, "master", "http-server")
def test_04_workspace_read(self): """Test the workspace_read function""" # The recipe was written by the workspace_write test. Read it and compare with the source recipe. recipe = workspace_read(self.repo, "master", "http-server") self.assertEqual(self.example_recipe, recipe)