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(),
    )
Example #2
0
def api_documentation(service_id):
    return redirect(documentation_url(), code=301)
Example #3
0
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
Example #4
0
def test_old_documentation_page_redirects(client):
    response = client.get(url_for("main.documentation"))
    assert response.status_code == 301
    assert response.location == documentation_url()
Example #5
0
def callbacks():
    return redirect(documentation_url("callbacks"), code=301)
Example #6
0
def documentation():
    return redirect(documentation_url(), code=301)