forked from hhursev/recipe-scrapers
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest_kwestiasmaku.py
55 lines (43 loc) · 2.18 KB
/
test_kwestiasmaku.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
from recipe_scrapers.kwestiasmaku import KwestiaSmaku
from tests import ScraperTest
class TestKwestiaSmakuScraper(ScraperTest):
scraper_class = KwestiaSmaku
def test_host(self):
self.assertEqual("kwestiasmaku.com", self.harvester_class.host())
def test_author(self):
self.assertEqual("kwestiasmaku", self.harvester_class.author())
def test_title(self):
self.assertEqual("Pieczony kalafior", self.harvester_class.title())
def test_total_time(self):
self.assertEqual(None, self.harvester_class.total_time())
def test_yields(self):
self.assertEqual("2 serving(s)", self.harvester_class.yields())
def test_image(self):
self.assertEqual(
"https://www.kwestiasmaku.com/sites/v123.kwestiasmaku.com/files/pieczony-kalafior-01_0.jpg",
self.harvester_class.image(),
)
def test_ingredients(self):
self.assertEqual(
[
"1 kalafior",
"4 łyżki oliwy z pierwszego tłoczenia",
"świeżo zmielony pieprz",
"1 i 1/2 łyżeczki kurkumy",
"1 łyżeczka czarnuszki",
"sól morska",
"sos czosnkowy lub ser feta",
"natka pietruszki",
],
self.harvester_class.ingredients(),
)
def test_instructions(self):
self.assertEqual(
"Odciąć liście z kalafiora, przekroić na pół i wyciąć nadmiar głąba. Główkę kalafiora rozdzielić na różyczki lub pokroić na cząstki.\n"
"Położyć na dużej blaszce (np. z wyposażenia piekarnika) wyłożonej papierem do pieczenia. Piekarnik nagrzać do 200 stopni C.\n"
"Kalafiora polać oliwą, posypać pieprzem, kurkumą i czarnuszką, a następnie dokładnie wymieszać i rozłożyć na całej powierzchni blachy.\n"
"Wstawić do nagrzanego piekarnika i piec przez 30 minut. Po upieczeniu doprawić solą i posiekaną natką pietruszki.",
self.harvester_class.instructions(),
)
def test_ratings(self):
self.assertEqual(5.0, self.harvester_class.ratings())