Skip to content

Commit

Permalink
Update tests as if no access should 404.
Browse files Browse the repository at this point in the history
  • Loading branch information
nmenezes0 committed Aug 12, 2024
1 parent 73ef140 commit 0c392ed
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/views/test_support_urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ def test_support_url_access(client):
url = reverse("users")
# Check anonymous user
response = client.get(url)
assert response.status_code == 302
assert response.status_code == 404
assert response.url == "/" # redirect to home

# Check normal non-staff user can't access
user = factories.UserFactory()
client.force_login(user)
response = client.get(url)
assert response.status_code == 302
assert response.status_code == 404
assert response.url == "/"

# Check staff user can access
Expand Down

0 comments on commit 0c392ed

Please sign in to comment.