Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Simplify streaming content assertions
Browse files Browse the repository at this point in the history
kevincarrogan committed Feb 5, 2024
1 parent d423bb4 commit 633b18f
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion unit_tests/caseworker/cases/views/test_main.py
Original file line number Diff line number Diff line change
@@ -43,4 +43,4 @@ def test_document_download(
assert isinstance(response, StreamingHttpResponse)
assert response.headers["Content-Type"] == "application/doc"
assert response.headers["Content-Disposition"] == 'attachment; filename="fakefile.doc"'
assert b"".join(s for s in response.streaming_content) == b"test"
assert b"".join(response.streaming_content) == b"test"
4 changes: 2 additions & 2 deletions unit_tests/exporter/applications/views/test_documents.py
Original file line number Diff line number Diff line change
@@ -50,7 +50,7 @@ def test_download_appeal_document(
assert isinstance(response, StreamingHttpResponse)
assert response.headers["Content-Type"] == "application/doc"
assert response.headers["Content-Disposition"] == 'attachment; filename="fakefile.doc"'
assert b"".join(c for c in response.streaming_content) == b"test"
assert b"".join(response.streaming_content) == b"test"


def test_download_appeal_document_failure(
@@ -161,4 +161,4 @@ def test_download_generated_document(
assert isinstance(response, StreamingHttpResponse)
assert response.headers["Content-Type"] == "application/doc"
assert response.headers["Content-Disposition"] == 'attachment; filename="fakefile.doc"'
assert b"".join(s for s in response.streaming_content) == b"test"
assert b"".join(response.streaming_content) == b"test"
2 changes: 1 addition & 1 deletion unit_tests/exporter/organisation/test_views.py
Original file line number Diff line number Diff line change
@@ -68,7 +68,7 @@ def test_download_document_on_organisation(
assert isinstance(response, StreamingHttpResponse)
assert response.headers["Content-Type"] == "application/doc"
assert response.headers["Content-Disposition"] == 'attachment; filename="fakefile.doc"'
assert b"".join(s for s in response.streaming_content) == b"test"
assert b"".join(response.streaming_content) == b"test"


def test_new_site_form_view(authorized_client, mock_exporter_user_me):

0 comments on commit 633b18f

Please sign in to comment.