mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-07-31 20:00:00 -04:00
Updated support views to represent new url structure
This commit is contained in:
@@ -76,7 +76,7 @@ def test_should_show_api_page_for_live_service(
|
||||
assert 'Your service is in trial mode' not in page.find('main').text
|
||||
|
||||
|
||||
def test_should_show_api_documentation_page(
|
||||
def test_api_documentation_page_should_redirect(
|
||||
logged_in_client,
|
||||
mock_login,
|
||||
api_user_active,
|
||||
@@ -84,9 +84,11 @@ def test_should_show_api_documentation_page(
|
||||
mock_has_permissions
|
||||
):
|
||||
response = logged_in_client.get(url_for('main.api_documentation', service_id=str(uuid.uuid4())))
|
||||
assert response.status_code == 200
|
||||
page = BeautifulSoup(response.data.decode('utf-8'), 'html.parser')
|
||||
assert page.h1.string.strip() == 'Documentation'
|
||||
assert response.status_code == 301
|
||||
assert response.location == url_for(
|
||||
'main.documentation',
|
||||
_external=True
|
||||
)
|
||||
|
||||
|
||||
def test_should_show_empty_api_keys_page(
|
||||
|
||||
@@ -511,6 +511,7 @@ def test_thanks(
|
||||
page = BeautifulSoup(response.data.decode('utf-8'), 'html.parser')
|
||||
assert ' '.join(page.find('main').find('p').text.split()) == message
|
||||
|
||||
|
||||
@pytest.mark.parametrize('view, old_ticket_type, expected_view, new_ticket_type', [
|
||||
('old_submit_feedback', 'problem', 'feedback', 'report-problem'),
|
||||
('old_submit_feedback', 'question', 'feedback', 'ask-question-give-feedback'),
|
||||
@@ -534,4 +535,3 @@ def test_old_problem_and_question_urls_redirect(
|
||||
ticket_type=new_ticket_type,
|
||||
_external=True,
|
||||
)
|
||||
|
||||
|
||||
@@ -68,10 +68,10 @@ def test_old_static_pages_redirect_to_using_notify_with_anchor(
|
||||
('information_risk_management', 'security'),
|
||||
('old_integration_testing', 'integration_testing'),
|
||||
('old_roadmap', 'roadmap'),
|
||||
('information_risk_management','security'),
|
||||
('old_terms','terms'),
|
||||
('information_security','using_notify'),
|
||||
('old_using_notify','using_notify'),
|
||||
('information_risk_management', 'security'),
|
||||
('old_terms', 'terms'),
|
||||
('information_security', 'using_notify'),
|
||||
('old_using_notify', 'using_notify'),
|
||||
])
|
||||
def test_old_static_pages_redirect(
|
||||
client,
|
||||
|
||||
Reference in New Issue
Block a user