before claude
This commit is contained in:
@@ -171,7 +171,25 @@ class TestCdiscountRealFixtures:
|
||||
assert isinstance(snapshot.price, float)
|
||||
assert snapshot.price > 0
|
||||
# Le prix doit avoir maximum 2 décimales
|
||||
assert snapshot.price == round(snapshot.price, 2)
|
||||
assert snapshot.price == round(snapshot.price, 2)
|
||||
|
||||
def test_parse_tuf608umrv004_price_value(self, store, fixture_tuf608umrv004):
|
||||
"""Le prix doit correspondre à 1199,99 €."""
|
||||
url = "https://www.cdiscount.com/informatique/.../f-10709-tuf608umrv004.html"
|
||||
snapshot = store.parse(fixture_tuf608umrv004, url)
|
||||
assert snapshot.price == 1199.99
|
||||
|
||||
def test_parse_tuf608umrv004_category_and_msrp(
|
||||
self, store, fixture_tuf608umrv004
|
||||
):
|
||||
"""La fixture ASUS doit fournir une catégorie et un prix conseillé."""
|
||||
url = "https://www.cdiscount.com/informatique/.../f-10709-tuf608umrv004.html"
|
||||
snapshot = store.parse(fixture_tuf608umrv004, url)
|
||||
assert snapshot.category
|
||||
assert "Ordinateur" in snapshot.category or "Portable" in snapshot.category
|
||||
assert snapshot.msrp is not None
|
||||
if snapshot.price:
|
||||
assert snapshot.msrp >= snapshot.price
|
||||
|
||||
def test_parse_a128902_price_format(self, store, fixture_a128902):
|
||||
"""Parse fixture a128902 - le prix doit être un float valide."""
|
||||
|
||||
Reference in New Issue
Block a user