ajout: ajout factorisation vin et meilleure barre

This commit is contained in:
2026-03-02 21:42:23 +01:00
parent 3619890dc4
commit e6c649b433
3 changed files with 67 additions and 44 deletions

View File

@@ -153,7 +153,7 @@ def mock_site():
html_product = f"""
<html>
<body>
<body>
<h1>MILLESIMA</h1>
<script id="__NEXT_DATA__" type="application/json">
{dumps(json_data)}
@@ -168,7 +168,7 @@ def mock_site():
html_product = f"""
<html>
<body>
<body>
<h1>MILLESIMA</h1>
<script id="__NEXT_DATA__" type="application/json">
{dumps(json_data)}
@@ -179,7 +179,7 @@ def mock_site():
list_pleine = f"""
<html>
<body>
<body>
<h1>LE WINE</h1>
<script id="__NEXT_DATA__" type="application/json">
{dumps({
@@ -207,7 +207,7 @@ def mock_site():
list_vide = f"""
<html>
<body>
<body>
<h1>LE WINE</h1>
<script id="__NEXT_DATA__" type="application/json">
{dumps({
@@ -319,7 +319,7 @@ def test_informations(scraper: Scraper):
def test_search(scraper: Scraper):
m = mock_open()
with patch("builtins.open", m):
scraper.getvins("wine.html", "fake_file.csv", False)
scraper.getvins("wine.html", "fake_file.csv", True)
assert m().write.called
all_writes = "".join(call.args[0] for call in m().write.call_args_list)