예제 #1
0
 def setUp(self):
     # tests are run from tests.py
     with open(
             os.path.join(os.getcwd(), 'recipe_scrapers', 'tests',
                          'test_data',
                          'steamykitchen.testhtml')) as file_opened:
         self.harvester_class = SteamyKitchen(file_opened, test=True)
예제 #2
0
class TestSteamyKitchenScraper(unittest.TestCase):
    def setUp(self):
        # tests are run from tests.py
        with open(
                os.path.join(os.getcwd(), 'recipe_scrapers', 'tests',
                             'test_data',
                             'steamykitchen.testhtml')) as file_opened:
            self.harvester_class = SteamyKitchen(file_opened, test=True)

    def test_host(self):
        self.assertEqual('steamykitchen.com', self.harvester_class.host())

    def test_title(self):
        self.assertEqual(self.harvester_class.title(),
                         'Hungarian Pork Stew Recipe')

    def test_total_time(self):
        self.assertEqual(120, self.harvester_class.total_time())

    def test_ingredients(self):
        self.assertListEqual([
            '8 medium yellow onions, chopped to medium dice',
            '1/3 cup canola/vegetable oil, plus more for frying',
            '9 3/4-inch thick boneless center cut loin pork chops, trimmed of fat, sliced in half length-wise, pounded 1/4 inch thin (if you’re lucky enough to find the thin loin chops, you’ll only have to pound them thin)',
            '1 tablespoon salt', '1 tablespoon pepper', 'flour for dredging',
            '3 tablespoons sweet Hungarian paprika',
            '6-8 cups water, or enough to fully immerse all ingredients in the pot',
            'Vegeta to taste, approximately 1 tablespoon (but if you can’t find it, just use vegetable/chicken soup seasoning packets)',
            '1 cup sour cream'
        ], self.harvester_class.ingredients())

    def test_instructions(self):
        return self.assertEqual(
            '1. In a large pot (6 qt) over medium to medium-high heat, add onions and canola oil. Saute onions until they are translucent, but not browned. Add more oil when necessary to keep them slick in the process. When the onions have finished cooking, turn down heat to low, add paprika to mixture and stir to mix well.\n2. Season each side of the pork slices generously with salt and pepper. Dredge the slices in flour on each side.\n3. In a frying pan over medium-high to high heat, heat about an inch of canola or vegetable oil. Fry each slice of pork until just barely golden brown around the edges, about 1-2 minutes, flipping halfway through. If they are thin enough, this will be enough to cook them fully. Lay them between sheets of paper towel on a plate to catch excess oil.\n4. Cut each of the pork slices in half and place them back in the pot with the onions. Add enough water to the pot to cover the pork and onions. Cover pot and simmer on medium heat for 45 minutes to 1 hour. Stir occasionally.\n5. When the stew is thickened up a bit from the flour and the onions are starting to disappear, it is ready for the final seasoning. Add salt, pepper and Vegeta seasoning to taste. Add sour cream and stir until the stew is a rich, thick consistency.',
            self.harvester_class.instructions())
예제 #3
0
class TestSteamyKitchenScraper(unittest.TestCase):
    def setUp(self):
        # tests are run from tests.py
        with open(os.path.join(
            os.getcwd(),
            'recipe_scrapers',
            'tests',
            'test_data',
            'streamykitchen.html'
        )) as file_opened:
            self.harvester_class = SteamyKitchen(file_opened, test=True)

    def test_host(self):
        self.assertEqual(
            'steamykitchen.com',
            self.harvester_class.host()
        )

    def test_title(self):
        self.assertEqual(
            self.harvester_class.title(),
            'Vietnamese Pho: Beef Noodle Soup Recipe'
        )

    def test_total_time(self):
        self.assertEqual(
            270,
            self.harvester_class.total_time()
        )

    def test_ingredients(self):
        self.assertListEqual(
            [
                'THE BROTH',
                '2 onions, halved',
                '4" nub of ginger, halved lengthwise',
                '5-6 pounds of good beef bones, preferably leg and knuckle',
                '1 pound of beef meat - chuck, brisket, rump, cut into large slices [optional]',
                '6 quarts of water',
                '1 package of Pho Spices [1 cinnamon stick, 1 tbl coriander seeds, 1 tbl fennel seeds, 5 whole star anise, 1 cardamom pod, 6 whole cloves - in mesh bag]',
                '1 1/2 tablespoons kosher salt (halve if using regular table salt)',
                '1/4 cup fish sauce',
                '1 inch chunk of yellow rock sugar (about 1 oz) - or 1oz of regular sugar',
                '2 pounds rice noodles (dried or fresh)',
                'Cooked beef from the broth (shredded or thinly sliced)',
                '1/2 pound flank, london broil, sirloin or eye of round, sliced as thinly as possible.',
                'big handful of each: mint, cilantro, basil',
                '2 limes, cut into wedges',
                '2-3 chili peppers, sliced',
                '2 big handfuls of fresh bean sprouts',
                'Hoisin sauce', 'Sriracha hot sauce'
            ],
            self.harvester_class.ingredients()
        )

    def test_instructions(self):
        return self.assertEqual(
            'Char: Turn your broiler on high and move rack to the highest spot. Place ginger and onions on baking sheet. Brush just a bit of cooking oil on the cut side of each. Broil on high until ginger and onions begin to char. Turn over and continue to char. This should take a total of 10-15 minutes. Parboil the bones: Fill large pot (12-qt capacity) with cool water. Boil water, and then add the bones, keeping the heat on high. Boil vigorously for 10 minutes. Drain, rinse the bones and rinse out the pot. If you have a lot of marrow in the bones, use a small spoon to scoop out and discard some of the marrow. Refill pot with bones and 6 qts of cool water. Bring to boil over high heat and lower to simmer. Using a ladle or a fine mesh strainer, remove any scum that rises to the top. Boil broth: Add ginger, onion, spice packet, beef, sugar, fish sauce, salt and simmer uncovered for 1 1/2 hours. Remove the beef meat and set aside (you\'ll be eating this meat later in the bowls) Continue simmering for another 1 1/2 hours. Strain broth and return the broth to the pot. Taste broth and adjust seasoning - this is a crucial step. If the broth\'s flavor doesn\'t quite shine yet, add 2 teaspoons more of fish sauce, large pinch of salt and a small nugget of rock sugar (or 1 teaspoon of regular sugar). Keep doing this until the broth tastes perfect. Prepare noodles & meat: Slice your flank/london broil/sirloin as thin as possible - try freezing for 15 minutes prior to slicing to make it easier. Remember the cooked beef meat that was part of your broth? Cut or shred the meat and set aside. Arrange all other ingredients on a platter for the table. Your guests will "assemble" their own bowls. Follow the directions on your package of noodles - there are many different sizes and widths of rice noodles, so make sure you read the directions. For some fresh rice noodles, just a quick 5 second blanch in hot water is all that\'s needed. The package that I purchased (above) - needed about 45 seconds in boiling water. Ladling: Bring your broth back to a boil. Line up your soup bowls next to the stove. Fill each bowl with rice noodles, shredded cooked beef and raw meat slices. As soon as the broth comes back to a boil, ladle into each bowl. the hot broth will cook your raw beef slices. Serve immediately. Guests can garnish their own bowls as they wish.',
            self.harvester_class.instructions()
        )
예제 #4
0
 def setUp(self):
     # tests are run from tests.py
     with open(
             os.path.join(os.path.dirname(os.path.realpath(__file__)),
                          'test_data',
                          'steamykitchen.testhtml')) as file_opened:
         self.harvester_class = SteamyKitchen(file_opened, test=True)
예제 #5
0
class TestSteamyKitchenScraper(unittest.TestCase):
    def setUp(self):
        # tests are run from tests.py
        with open(
                os.path.join(os.getcwd(), 'recipe_scrapers', 'tests',
                             'test_data',
                             'streamykitchen.html')) as file_opened:
            self.harvester_class = SteamyKitchen(file_opened, test=True)

    def test_host(self):
        self.assertEqual('steamykitchen.com', self.harvester_class.host())

    def test_title(self):
        self.assertEqual(self.harvester_class.title(),
                         'Vietnamese Pho: Beef Noodle Soup Recipe')

    def test_total_time(self):
        self.assertEqual(270, self.harvester_class.total_time())

    def test_ingredients(self):
        self.assertListEqual([
            'THE BROTH', '2 onions, halved',
            '4" nub of ginger, halved lengthwise',
            '5-6 pounds of good beef bones, preferably leg and knuckle',
            '1 pound of beef meat - chuck, brisket, rump, cut into large slices [optional]',
            '6 quarts of water',
            '1 package of Pho Spices [1 cinnamon stick, 1 tbl coriander seeds, 1 tbl fennel seeds, 5 whole star anise, 1 cardamom pod, 6 whole cloves - in mesh bag]',
            '1 1/2 tablespoons kosher salt (halve if using regular table salt)',
            '1/4 cup fish sauce',
            '1 inch chunk of yellow rock sugar (about 1 oz) - or 1oz of regular sugar',
            '2 pounds rice noodles (dried or fresh)',
            'Cooked beef from the broth (shredded or thinly sliced)',
            '1/2 pound flank, london broil, sirloin or eye of round, sliced as thinly as possible.',
            'big handful of each: mint, cilantro, basil',
            '2 limes, cut into wedges', '2-3 chili peppers, sliced',
            '2 big handfuls of fresh bean sprouts', 'Hoisin sauce',
            'Sriracha hot sauce'
        ], self.harvester_class.ingredients())

    def test_instructions(self):
        return self.assertEqual(
            'Char: Turn your broiler on high and move rack to the highest spot. Place ginger and onions on baking sheet. Brush just a bit of cooking oil on the cut side of each. Broil on high until ginger and onions begin to char. Turn over and continue to char. This should take a total of 10-15 minutes. Parboil the bones: Fill large pot (12-qt capacity) with cool water. Boil water, and then add the bones, keeping the heat on high. Boil vigorously for 10 minutes. Drain, rinse the bones and rinse out the pot. If you have a lot of marrow in the bones, use a small spoon to scoop out and discard some of the marrow. Refill pot with bones and 6 qts of cool water. Bring to boil over high heat and lower to simmer. Using a ladle or a fine mesh strainer, remove any scum that rises to the top. Boil broth: Add ginger, onion, spice packet, beef, sugar, fish sauce, salt and simmer uncovered for 1 1/2 hours. Remove the beef meat and set aside (you\'ll be eating this meat later in the bowls) Continue simmering for another 1 1/2 hours. Strain broth and return the broth to the pot. Taste broth and adjust seasoning - this is a crucial step. If the broth\'s flavor doesn\'t quite shine yet, add 2 teaspoons more of fish sauce, large pinch of salt and a small nugget of rock sugar (or 1 teaspoon of regular sugar). Keep doing this until the broth tastes perfect. Prepare noodles & meat: Slice your flank/london broil/sirloin as thin as possible - try freezing for 15 minutes prior to slicing to make it easier. Remember the cooked beef meat that was part of your broth? Cut or shred the meat and set aside. Arrange all other ingredients on a platter for the table. Your guests will "assemble" their own bowls. Follow the directions on your package of noodles - there are many different sizes and widths of rice noodles, so make sure you read the directions. For some fresh rice noodles, just a quick 5 second blanch in hot water is all that\'s needed. The package that I purchased (above) - needed about 45 seconds in boiling water. Ladling: Bring your broth back to a boil. Line up your soup bowls next to the stove. Fill each bowl with rice noodles, shredded cooked beef and raw meat slices. As soon as the broth comes back to a boil, ladle into each bowl. the hot broth will cook your raw beef slices. Serve immediately. Guests can garnish their own bowls as they wish.',
            self.harvester_class.instructions())
예제 #6
0
 def setUp(self):
     # tests are run from tests.py
     with open(os.path.join(
         os.getcwd(),
         'recipe_scrapers',
         'tests',
         'test_data',
         'streamykitchen.html'
     )) as file_opened:
         self.harvester_class = SteamyKitchen(file_opened, test=True)