Skip to content

Commit

Permalink
tests: remove duplicate redirect assertions
Browse files Browse the repository at this point in the history
`assertRedirects` verifies the status code as well as the redirect URL.
Therefore, prefer `assertRedirects` over `assert response.status_code == 302`
or `assert response.url == next_url`.
  • Loading branch information
EwenKorr committed Feb 5, 2025
1 parent be10a05 commit 0b10a54
Show file tree
Hide file tree
Showing 2 changed files with 72 additions and 135 deletions.
1 change: 0 additions & 1 deletion tests/gps/test_create_beneficiary.py
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,6 @@ def test_existing_user_with_email(client):
},
}

assert response.url == next_url
assert client.session[job_seeker_session_name] == expected_job_seeker_session
assertRedirects(response, next_url)

Expand Down
Loading

0 comments on commit 0b10a54

Please sign in to comment.