コード例 #1
0
 def test_load_second_named_xml_recipe_header_into_list(self):
  recipe_header = load_xml_header_list(
     "C:\Documents and Settings\All Users\Documents\My BigOven Recipes\Publish",
     "Beignets_-TechieVampire.xml",
     [])
  self.assertEqual.im_class.maxDiff = None
  self.assertEqual(recipe_header.recipe_list, 
    [["Beignets -TechieVampire","","","",
    'Half fill a large, deep saucepan with oil and preheat it to 375 degrees F. Sift together the flour, salt, baking powder, and cinnamon into a large mixing bowl. In a separate bowl, beat the egg well, then beat in the sugar, milk, and vanilla. Pour the egg mixture into the flour and mix slightly until moistened. Turn onto a floured surface and knead lightly. Roll the dough out to a 1/4 inch thickness. Slice into diamond shapes, about 3 inches long. Fry in oil, turning once, until they are golden brown and puffed up. Remove, drain on paper towels, and sprinkle with confectioners\xe2\x80\x99 sugar. Serve immediately.']]) 
コード例 #2
0
 def test_load_named_xml_recipe_header_into_list(self):
  recipe_header = load_xml_header_list(
     "C:\Documents and Settings\All Users\Documents\My BigOven Recipes\Publish",
     "_Victoria's_Pumpkin_Bread_(From__The_Dairy_Hollow_House_Cookbook__by_Crescent_Dragonwagon_with_Jan_Brown,_Macmillan_Publishing_Company).xml",
     [])
  self.assertEqual.im_class.maxDiff = None
  self.assertEqual(recipe_header.recipe_list, 
    [[' Victoria\'s Pumpkin Bread (From "The Dairy Hollow House Cookbook" by Crescent Dragonwagon with Jan Brown, Macmillan Publishing Company)',
    '','','',
    "New York Times Magazine - Food; A Timely Tea By Liz LoganPublished: October 28, 1990[ Wait time: Minimum = 0 hours]1. Preheat the oven to 350 degrees.2. In a large bowl, sift together the cinnamon, baking powder, nutmeg, baking soda, salt, ground cloves, ground ginger, allspice and flour. Set aside.3. In a separate bowl, mix together the vegetable oil, yogurt, eggs, sugar and pumpkin puree. Mix until smooth.4. Combine the two mixtures and beat until smooth. Fold in the walnuts.5. Pour the batter into three 8-by-4-inch (or 9-by-5-inch) loaf pans. (The batter should not reach more than two-thirds of the way up each pan.) Bake for about 1 hour, or until the loaves shrink away from the sides of the pan and have a hollow sound when tapped. Test for doneness after 45 minutes.Yield: Three loaves."
    ]])