def test_api_documentation_page_should_redirect(client_request, mock_login, api_user_active, mock_get_service, mock_has_permissions): client_request.get( "main.api_documentation", service_id=SERVICE_ONE_ID, _expected_status=301, _expected_redirect=documentation_url(), )
def api_documentation(service_id): return redirect(documentation_url(), code=301)
def test_documentation_url(mocker, app_, feature, lang, section, expected): with app_.test_request_context(): mocker.patch("app.get_current_locale", return_value=lang) assert documentation_url(feature, section) == expected
def test_old_documentation_page_redirects(client): response = client.get(url_for("main.documentation")) assert response.status_code == 301 assert response.location == documentation_url()
def callbacks(): return redirect(documentation_url("callbacks"), code=301)
def documentation(): return redirect(documentation_url(), code=301)