diff --git a/pyproject.toml b/pyproject.toml index 019b0ae..96a7788 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -48,3 +48,6 @@ ignore = [ ] select = ["ALL"] extend-safe-fixes = ["D415"] + +[tool.pytest.ini_options] +asyncio_default_fixture_loop_scope = "function" diff --git a/tests/main_test.py b/tests/main_test.py index 193cb23..8b9898d 100644 --- a/tests/main_test.py +++ b/tests/main_test.py @@ -13,6 +13,7 @@ test_websites = [ "https://btmet.com/", "https://extratorrent.st/", # github is blocking these "https://idope.se/", # github is blocking these + "https://www.ygg.re/", ] @@ -20,9 +21,7 @@ test_websites = [ def test_bypass(website: str): response = client.post( "/v1", - json=LinkRequest( - url=website, maxTimeout=120 * len(test_websites), cmd="request.get" - ).model_dump(), + json=LinkRequest(url=website, maxTimeout=30, cmd="request.get").model_dump(), ) if response.status_code == HTTPStatus.TOO_MANY_REQUESTS: # if rate limited