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(),
    )
예제 #2
0
def api_documentation(service_id):
    return redirect(documentation_url(), code=301)
예제 #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
예제 #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()
예제 #5
0
def callbacks():
    return redirect(documentation_url("callbacks"), code=301)
예제 #6
0
def documentation():
    return redirect(documentation_url(), code=301)