mirror of
https://github.com/guezoloic/millesima_projetS6.git
synced 2026-03-28 19:13:42 +00:00
ajout(main.py): meilleur systeme de cache
This commit is contained in:
28
test_main.py
28
test_main.py
@@ -41,7 +41,7 @@ def mock_site():
|
||||
"name": "En promotion",
|
||||
"value": "Non",
|
||||
"sequence": 80,
|
||||
"displayable": "false",
|
||||
"displayable": "False",
|
||||
"type": "CHECKBOX",
|
||||
"isSpirit": False,
|
||||
},
|
||||
@@ -73,6 +73,24 @@ def mock_site():
|
||||
"isSpirit": False,
|
||||
"groupIdentifier": "appellation_433",
|
||||
},
|
||||
"note_rp": {
|
||||
"valueId": "91",
|
||||
"name": "Parker",
|
||||
"value": "91",
|
||||
"isSpirit": False,
|
||||
},
|
||||
"note_jr": {
|
||||
"valueId": "17",
|
||||
"name": "J. Robinson",
|
||||
"value": "17",
|
||||
"isSpirit": False,
|
||||
},
|
||||
"note_js": {
|
||||
"valueId": "93-94",
|
||||
"name": "J. Suckling",
|
||||
"value": "93-94",
|
||||
"isSpirit": False
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
@@ -123,3 +141,11 @@ def test_appellation(scraper: Scraper):
|
||||
"nino-negri-5-stelle-sfursat-2022.html"
|
||||
)
|
||||
assert appellation.appellation() == "Sforzato di Valtellina"
|
||||
|
||||
def test_critiques(scraper: Scraper):
|
||||
critiques: ScraperData = scraper.getjsondata(
|
||||
"nino-negri-5-stelle-sfursat-2022.html"
|
||||
)
|
||||
assert critiques.parker() == "91"
|
||||
assert critiques.robinson() == "17"
|
||||
assert critiques.suckling() == "93.5"
|
||||
Reference in New Issue
Block a user