test: Strengthen assertion in validation rate limit SAML pipeline exemption test#169
Closed
Copilot wants to merge 5 commits intojb/saml-auth-redirectfrom
Closed
test: Strengthen assertion in validation rate limit SAML pipeline exemption test#169Copilot wants to merge 5 commits intojb/saml-auth-redirectfrom
Copilot wants to merge 5 commits intojb/saml-auth-redirectfrom
Conversation
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: jono-booth <6801693+jono-booth@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] WIP address feedback on SAML TPA redirect
test: Strengthen assertion in validation rate limit SAML pipeline exemption test
Mar 6, 2026
6f1ee96 to
41ef966
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
The assertion in
RegistrationValidationViewTests.test_rate_limiting_exempted_for_saml_pipelineusedstatus_code != 403, which would pass silently on a 500 or any other non-403 error — defeating the purpose of the test.Changed:
assert response.status_code != 403→self.assertHttpOK(response)(explicitly asserts 200)assert response.json().get('validation_decisions') == {}to verify the expected response shape for an empty POST body, consistent withtest_no_decision_for_empty_requestThis matches the pattern already in place for the registration endpoint counterpart test (
assertHttpOK+ error code assertion).Supporting information
Addresses feedback on #155.
Testing instructions
Run the targeted test:
Deadline
None
Other information
Test-only change; no production code modified.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.