From e8ce9948ded6949fce2752ebb719d1d5b8bcf1a8 Mon Sep 17 00:00:00 2001 From: Michael Stephens Date: Wed, 30 Jun 2010 15:31:30 -0400 Subject: [PATCH] test run_recipe --- saucebrush/tests/recipes.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/saucebrush/tests/recipes.py b/saucebrush/tests/recipes.py index 5c0b4d9..da8e6eb 100644 --- a/saucebrush/tests/recipes.py +++ b/saucebrush/tests/recipes.py @@ -1,6 +1,6 @@ import doctest import unittest -from saucebrush import Recipe +from saucebrush import Recipe, run_recipe from saucebrush.filters import Filter @@ -23,10 +23,17 @@ class RecipeTestCase(unittest.TestCase): saver = Saver() recipe = Recipe(Raiser(), error_stream=saver) recipe.run([{'a': 1}, {'b': 2}]) + recipe.done() self.assertEqual(saver.saved[0]['record'], {'a': 1}) self.assertEqual(saver.saved[1]['record'], {'b': 2}) + def test_run_recipe(self): + saver = Saver() + run_recipe([1, 2], saver) + + self.assertEqual(saver.saved, [1, 2]) + def test_done(self): saver = Saver() recipe = Recipe(saver)