forked from hhursev/recipe-scrapers
-
Notifications
You must be signed in to change notification settings - Fork 0
/
test_heb.py
58 lines (46 loc) · 2.19 KB
/
test_heb.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
from recipe_scrapers.heb import HEB
from tests import ScraperTest
class TestHEBScraper(ScraperTest):
scraper_class = HEB
def test_host(self):
self.assertEqual("heb.com", self.harvester_class.host())
def test_canonical_url(self):
self.assertEqual(
"https://www.heb.com/recipe/recipe-item/truffled-spaghetti-squash/1398755977632",
self.harvester_class.canonical_url(),
)
def test_title(self):
self.assertEqual("Truffled Spaghetti Squash", self.harvester_class.title())
def test_author(self):
self.assertEqual(self.harvester_class.author(), "H-E-B")
def test_total_time(self):
self.assertEqual(60, self.harvester_class.total_time())
def test_yields(self):
self.assertEqual("8 servings", self.harvester_class.yields())
def test_ingredients(self):
self.assertEqual(
[
"1 large spaghetti squash",
"1 Tsp Sabatino Truffle salt",
"4 Tbsp unsalted butter",
"1 Tbsp Rustico Truffle Oil",
],
self.harvester_class.ingredients(),
)
def test_instructions(self):
self.assertEqual(
"\n".join(
[
"Preheat oven to 400˚F. Cut spaghetti squash in half from top to bottom (lengthwise).",
"Place the spaghetti squash halves, cut side down onto a sheet pan. Roast for 30-45 minutes or until a knife can pierce the outside of skin easily, like a baked potato.",
"Once Squash is fully cooked and soft remove it from oven and let it cool for 10 minutes before scooping out meat of squash. In a serving bowl scoop or with a fork scrape out squash and add truffle salt, butter and truffle oil.",
"Toss all ingredients together until butter is fully melted. Season to taste if needed and serve warm.",
]
),
self.harvester_class.instructions(),
)
def test_image(self):
self.assertEqual(
"https://images.heb.com/is/image/HEBGrocery/rcp-thumbnail/spicy-spaghetti-squash-boats-recipe.jpg",
self.harvester_class.image(),
)