diff --git a/pyproject.toml b/pyproject.toml index e638cbf..e6e8fe4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -8,6 +8,10 @@ dependencies = [ "tqdm==4.67.3", ] +[tool.pytest.ini_options] +pythonpath = "src" +testpaths = ["tests"] + [project.optional-dependencies] test = ["pytest==8.4.2", "requests-mock==1.12.1", "flake8==7.3.0"] doc = ["mkdocs<2.0.0", "mkdocs-material==9.6.23", "mkdocstrings[python]"] diff --git a/tests/test_scraper.py b/tests/test_scraper.py index fb4401a..0454001 100755 --- a/tests/test_scraper.py +++ b/tests/test_scraper.py @@ -185,17 +185,11 @@ def mock_site(): {dumps({ "props": { "pageProps": { - "initialReduxState": { - "categ": { - "content": { - "products": [ - {"seoKeyword": "/nino-negri-5-stelle-sfursat-2022.html",}, - {"seoKeyword": "/poubelle",}, - {"seoKeyword": "/",} - ] - } - } - } + "products": [ + {"seoKeyword": "/nino-negri-5-stelle-sfursat-2022.html",}, + {"seoKeyword": "/poubelle",}, + {"seoKeyword": "/",} + ] } } } @@ -213,14 +207,8 @@ def mock_site(): {dumps({ "props": { "pageProps": { - "initialReduxState": { - "categ": { - "content": { - "products": [ - ] - } - } - } + "products": [ + ] } } }