Skip to content

Avoid blacklisting app migrations failing in projects with multiple databases#429

Merged
Andrew-Chen-Wang merged 2 commits intojazzband:masterfrom
ghazi-git:master
Jun 27, 2021
Merged

Avoid blacklisting app migrations failing in projects with multiple databases#429
Andrew-Chen-Wang merged 2 commits intojazzband:masterfrom
ghazi-git:master

Conversation

@ghazi-git
Copy link
Copy Markdown
Contributor

Fixes #428

For tests, it didn't seem straight forward to update the relevant test tests.test_token_blacklist.TestPopulateJtiHexMigration.test_jti_field_should_contain_uuid_hex_strings given that all querysets are run against the default database (specifically the creation of the OutstandingToken under RefreshToken.for_user). So, the best way I found to test this change is to add a second test database. Before the fix, all existing tests fail because the migration of the second database fails. After the fix, all the tests pass.

…he blacklisting app will run with no issues in projects with multiple databases
Copy link
Copy Markdown
Member

@Andrew-Chen-Wang Andrew-Chen-Wang left a comment

Choose a reason for hiding this comment

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

Thanks for this fix!

@Andrew-Chen-Wang Andrew-Chen-Wang merged commit 6520278 into jazzband:master Jun 27, 2021
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.

token_blacklist migration fails when working with multiple databases

2 participants