Skip to content

Test Improvements#60

Merged
tarekio merged 8 commits intomainfrom
test-fixes
Jun 17, 2025
Merged

Test Improvements#60
tarekio merged 8 commits intomainfrom
test-fixes

Conversation

@cango91
Copy link
Contributor

@cango91 cango91 commented Jan 16, 2025

Jira Issue

Description

This PR phases out '200' and '302' responses expected by the test client for anonymous client, instead sets request headers to receive the correct 401 repsonse.

follow_redirects=True because almost all endpoints respond to test client with an initial 308.
If the test client sends header Accept: */* the redirects will result in sending html content of the login page in anonymous client tests. However, if we explicitly set that header to Accept: application/json then a proper 401 API response is received after the redirect.

Checklist

  • Tests added/updated
  • Documentation updated (if needed)
  • New strings prepared for translations

API Changes (if applicable)

  • Permissions checked
  • Endpoint tests added

Additional Notes

[Any other relevant information]

@cango91 cango91 requested a review from tarekio January 16, 2025 09:02
@cango91 cango91 added the enhancement New feature or request label Jan 16, 2025
@tarekio tarekio requested a review from level09 January 16, 2025 18:56
Copy link
Collaborator

@level09 level09 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is good 👍

@tarekio tarekio merged commit ecec06f into main Jun 17, 2025
7 checks passed
@tarekio tarekio deleted the test-fixes branch June 17, 2025 18:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants