mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-06 15:18:25 -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:
@@ -3,7 +3,7 @@ from unittest.mock import Mock
|
||||
from app.s3_client.s3_csv_client import set_metadata_on_csv_upload
|
||||
|
||||
|
||||
def test_sets_metadata(client, mocker):
|
||||
def test_sets_metadata(client_request, mocker):
|
||||
mocked_s3_object = Mock()
|
||||
mocked_get_s3_object = mocker.patch(
|
||||
'app.s3_client.s3_csv_client.get_csv_upload',
|
||||
|
||||
Reference in New Issue
Block a user