browsertrix/backend/test/test_settings.py
Ilya Kreymer 08f6847194
Configurable Max Scale for frontend (#1557)
Allow maximum scale option to be fully configurable via
`max_crawl_scale`. Already configurable on the backend, and now exposed
to the frontend via API `/api/settings` `maxCrawlScale` value.

The workflow editor and workflow details are updated to allow selecting
the scale up to the maxCrawlScale setting (which defaults to 3 if not
set).
2024-03-11 16:21:20 -07:00

20 lines
414 B
Python

import requests
from .conftest import API_PREFIX
def test_settings():
r = requests.get(f"{API_PREFIX}/settings")
assert r.status_code == 200
data = r.json()
assert data == {
"registrationEnabled": False,
"jwtTokenLifetime": 86400,
"defaultBehaviorTimeSeconds": 300,
"maxPagesPerCrawl": 4,
"maxScale": 3,
"defaultPageLoadTimeSeconds": 120,
}