mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-11 10:28:41 -04:00
Stop using platform_admin_client fixture
We have a `client_request` fixture which does a bunch of useful stuff like: - checking the status code of the response - returning a `BeautifulSoup` object For most tests of a platform admin view we used `platform_admin_client` instead. This is not as good because it returns a raw `Response` object and doesn’t do the additional checks. This commit converts all the tests using `platform_admin_client` to: use new `client_request` and log in as `platform_admin_user` before making any requests. This is also nice because it makes any test easy to parametrize with additional users, for example to test differences in behaviour dependant on being platform admin or not.
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
{% from "components/table.html" import list_table, field, text_field, link_field, right_aligned_field_heading, hidden_field_heading %}
|
||||
|
||||
{% block per_page_title %}
|
||||
{{ page_title|capitalize }}
|
||||
Email complaints
|
||||
{% endblock %}
|
||||
|
||||
{% block platform_admin_content %}
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
{% from "components/button/macro.njk" import govukButton %}
|
||||
|
||||
{% block per_page_title %}
|
||||
Platform admin
|
||||
Summary
|
||||
{% endblock %}
|
||||
|
||||
{% block platform_admin_content %}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{% extends "views/platform-admin/_base_template.html" %}
|
||||
|
||||
{% block per_page_title %}
|
||||
Platform admin
|
||||
Reports
|
||||
{% endblock %}
|
||||
|
||||
{% block platform_admin_content %}
|
||||
|
||||
Reference in New Issue
Block a user