mirror of
https://github.com/guezoloic/millesima_projetS6.git
synced 2026-03-28 19:13:42 +00:00
ajout(test_main): question 1 assertion si bien une liste
This commit is contained in:
@@ -103,5 +103,6 @@ def test_soup(scraper: Scraper):
|
|||||||
def test_getProductName(scraper: Scraper):
|
def test_getProductName(scraper: Scraper):
|
||||||
jsondata = scraper.getjsondata("nino-negri-5-stelle-sfursat-2022.html")
|
jsondata = scraper.getjsondata("nino-negri-5-stelle-sfursat-2022.html")
|
||||||
assert jsondata["productName"] == "Nino Negri : 5 Stelle Sfursat 2022"
|
assert jsondata["productName"] == "Nino Negri : 5 Stelle Sfursat 2022"
|
||||||
|
assert isinstance(jsondata["items"], list)
|
||||||
assert len(jsondata["items"]) > 0
|
assert len(jsondata["items"]) > 0
|
||||||
assert jsondata["items"][0]["offerPrice"] == 390
|
assert jsondata["items"][0]["offerPrice"] == 390
|
||||||
Reference in New Issue
Block a user