mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-20 14:29:51 -04:00
Remove temporary raw_response argument
We added a new argument to `client_request.get` and `client_request.post` to specify that it should return a raw `Response` object rather than an instance of `BeautifulSoup`. This is useful because sometimes we need to look at stuff like the response headers. However it turns out we already have a separate method for this, so rather than invent something new I think it’s better to stick with the thing we already have.
This commit is contained in:
@@ -690,12 +690,11 @@ def test_should_show_preview_error_image_letter_notification_on_preview_error(
|
||||
|
||||
mocker.patch("builtins.open", mock_open(read_data=b"preview error image"))
|
||||
|
||||
response = client_request.get(
|
||||
response = client_request.get_response(
|
||||
'main.view_letter_notification_as_preview',
|
||||
service_id=SERVICE_ONE_ID,
|
||||
notification_id=fake_uuid,
|
||||
filetype='png',
|
||||
_raw_response=True,
|
||||
)
|
||||
|
||||
assert response.get_data(as_text=True) == 'preview error image'
|
||||
@@ -893,12 +892,11 @@ def test_should_show_image_of_precompiled_letter_notification(
|
||||
}
|
||||
)
|
||||
|
||||
response = client_request.get(
|
||||
response = client_request.get_response(
|
||||
'main.view_letter_notification_as_preview',
|
||||
service_id=SERVICE_ONE_ID,
|
||||
notification_id=fake_uuid,
|
||||
filetype="png",
|
||||
_raw_response=True,
|
||||
)
|
||||
|
||||
assert response.get_data(as_text=True) == 'foo'
|
||||
|
||||
Reference in New Issue
Block a user