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:
Chris Hill-Scott
2021-12-30 16:13:49 +00:00
parent 0fd79bb500
commit 50eae6f935
25 changed files with 1021 additions and 816 deletions

View File

@@ -331,7 +331,6 @@ def platform_admin_list_complaints():
return render_template(
'views/platform-admin/complaints.html',
complaints=response['complaints'],
page_title='All Complaints',
page=page,
prev_page=prev_page,
next_page=next_page,