reduce max time to 30 sec

This commit is contained in:
Thephaseless 2024-10-18 16:03:17 +00:00
parent 44aa188e75
commit 24fe3ea051
2 changed files with 5 additions and 3 deletions

View File

@ -48,3 +48,6 @@ ignore = [
]
select = ["ALL"]
extend-safe-fixes = ["D415"]
[tool.pytest.ini_options]
asyncio_default_fixture_loop_scope = "function"

View File

@ -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