mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-05-04 16:11:11 -04:00
Add an index page for the API integration
This commit adds a placeholder page which, for now, just has links to the API keys page and links to the clients. There’s more stuff to come on this page, but this commit just does the reorganising so that it’s easier to review.
This commit is contained in:
@@ -1,10 +1,26 @@
|
||||
import uuid
|
||||
|
||||
from flask import url_for
|
||||
from bs4 import BeautifulSoup
|
||||
|
||||
from tests import validate_route_permission
|
||||
|
||||
|
||||
def test_should_show_api_page(
|
||||
app_,
|
||||
mock_login,
|
||||
api_user_active,
|
||||
mock_get_service,
|
||||
mock_has_permissions
|
||||
):
|
||||
with app_.test_request_context(), app_.test_client() as client:
|
||||
client.login(api_user_active)
|
||||
response = client.get(url_for('main.api_integration', service_id=str(uuid.uuid4())))
|
||||
assert response.status_code == 200
|
||||
page = BeautifulSoup(response.data.decode('utf-8'), 'html.parser')
|
||||
assert page.h1.string.strip() == 'API integration'
|
||||
|
||||
|
||||
def test_should_show_empty_api_keys_page(app_,
|
||||
api_user_pending,
|
||||
mock_login,
|
||||
|
||||
@@ -342,7 +342,7 @@ def test_menu_manage_api_keys(mocker,
|
||||
assert url_for('main.service_settings', service_id=service_one['id']) not in page
|
||||
assert url_for('main.show_all_services') not in page
|
||||
|
||||
assert url_for('main.api_keys', service_id=service_one['id']) in page
|
||||
assert url_for('main.api_integration', service_id=service_one['id']) in page
|
||||
|
||||
|
||||
def test_menu_all_services_for_platform_admin_user(mocker,
|
||||
|
||||
Reference in New Issue
Block a user