Skip to content

Commit

Permalink
test(views): page_not_found and server_error
Browse files Browse the repository at this point in the history
  • Loading branch information
thekaveman committed Jul 18, 2023
1 parent 70defc5 commit f49c38a
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions tests/pytest/core/test_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
TEMPLATE_AGENCY,
bad_request,
csrf_failure,
page_not_found,
server_error,
)
from benefits.core.middleware import ROUTE_INDEX

Expand Down Expand Up @@ -177,6 +179,20 @@ def test_not_found_no_active_agency(mocker, client, mocked_session_update):
assert mocked_session_update.call_args.kwargs["origin"] == reverse(ROUTE_INDEX)


@pytest.mark.django_db
def test_page_not_found(app_request):
response = page_not_found(app_request, Exception())

assert response.status_code == 404


@pytest.mark.django_db
def test_server_error(app_request):
response = server_error(app_request)

assert response.status_code == 500


@pytest.mark.django_db
def test_logged_out(client):
path = reverse(ROUTE_LOGGED_OUT)
Expand Down

0 comments on commit f49c38a

Please sign in to comment.