mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-24 00:07:02 -04:00
Replace uses of client to set request context
Some tests use the `client` fixture but don’t call any of its methods. The reason for doing this is because the test depends on something in the request context. This commit replaces all those instances with `client_request`, which also sets the request context. These tests are the last ones that still use the `client` fixture. By replacing it with `client_request` we will be able to say that no tests should be using the `client` fixture directly.
This commit is contained in:
@@ -9,7 +9,7 @@ from app.main.forms import CreateKeyForm
|
||||
('2001-01-01 01:01:01', None),
|
||||
))
|
||||
def test_return_validation_error_when_key_name_exists(
|
||||
client,
|
||||
client_request,
|
||||
expiry_date,
|
||||
expected_errors,
|
||||
):
|
||||
@@ -40,7 +40,7 @@ def test_return_validation_error_when_key_name_exists(
|
||||
('invalid', 'Select the type of key')
|
||||
]
|
||||
)
|
||||
def test_return_validation_error_when_key_type_not_chosen(client, key_type, expected_error):
|
||||
def test_return_validation_error_when_key_type_not_chosen(client_request, key_type, expected_error):
|
||||
|
||||
form = CreateKeyForm(
|
||||
[],
|
||||
|
||||
Reference in New Issue
Block a user