Skip to content

Conversation

juanbailon
Copy link
Contributor

@juanbailon juanbailon commented Apr 2, 2025

  • Raise TokenBlacklistNotConfigured exception when token_blacklist app is not installed, returning an error message and a 501 Not Implemented status code.

    • Previously, it returned 200 OK with no message when the blacklist app was missing, which was misleading because it implied the token was successfully blacklisted when, in reality, no blacklisting occurred
  • Return a success message ('Token blacklisted') when a token is successfully blacklisted.

  • Update tests to reflect the new return behavior.

Tackles Issue #742

Tests name changes

In test_views.py

  • test_it_should_return_nothing_if_everything_ok --> test_it_should_return_message_if_everything_ok

In test_serializers.py

  • test_blacklist_app_not_installed_should_pass --> test_blacklist_app_not_installed_should_raise_token_blacklist_not_configured

juanbailon and others added 2 commits April 2, 2025 04:56
- Raise  exception when token_blacklist app is not enabled or available.
- Return a success message ('Token blacklisted') when a token is successfully blacklisted.
- Update tests to reflect the new return behavior.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant