This commit is contained in:
@@ -7,7 +7,6 @@ URL map to catch that.
|
||||
|
||||
import pytest
|
||||
|
||||
|
||||
ADMIN_ROUTES = [
|
||||
'/admin',
|
||||
'/admin/backup/create',
|
||||
@@ -30,11 +29,11 @@ class TestAdminRouteRegistration:
|
||||
adapter = app.url_map.bind('localhost')
|
||||
try:
|
||||
adapter.match(route, method='GET')
|
||||
except Exception:
|
||||
except Exception: # noqa: BLE001 — test boundary, first of two attempts
|
||||
# Some routes are POST-only; try POST
|
||||
try:
|
||||
adapter.match(route, method='POST')
|
||||
except Exception as exc:
|
||||
except Exception as exc: # noqa: BLE001 — test boundary, failure is reported via pytest.fail
|
||||
pytest.fail(f'Route {route} is not registered: {exc}')
|
||||
|
||||
@pytest.mark.parametrize('route', ADMIN_ROUTES)
|
||||
|
||||
Reference in New Issue
Block a user