ajout(main.py): meilleur systeme de cache

This commit is contained in:
2026-02-08 19:03:49 +01:00
parent 0d78b1aec3
commit 5c22777c2d
2 changed files with 68 additions and 21 deletions

View File

@@ -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"