Skip to content

Add test to cover last_login_at timestamp in OAuth workflow#3878

Merged
tillprochaska merged 2 commits intodevelopfrom
oauth-last-login-test
Oct 15, 2024
Merged

Add test to cover last_login_at timestamp in OAuth workflow#3878
tillprochaska merged 2 commits intodevelopfrom
oauth-last-login-test

Conversation

@tillprochaska
Copy link
Contributor

@tillprochaska tillprochaska commented Oct 15, 2024

This is a follow-up to #3852. This PR above didn’t include a test for the expected behavior when logging in via OAuth. There have been a lot of changes to authentication testing on the develop branch that were not present in the 4.0 release branch, so any changes would have lead to annoying merge conflicts down the line.

But now that the 4.0 release is integrated, it’s time to add a proper test :)

This is a follow-up to #3852. This PR above didn’t include a test for the expected behavior when logging in via OAuth. There have been a lot of changes to authentication testing on the develop branch that were not present in the 4.0 release branch, so any changes would have lead to annoying merge conflicts down the line.

But now that the 4.0 release is integrated, it’s time to add a proper test :)
This was an oversight and should have always called `super().setUp()` instead of `super().setUpClass()`. This didn’t fail when running tests for the entire file (`pytest test_sessions_api.py`), but it did always fail when running individual tests (`pytest test_sessions_api.py -k oauth_callback`).
@tillprochaska tillprochaska marked this pull request as ready for review October 15, 2024 17:26
Copy link
Contributor

@stchris stchris left a comment

Choose a reason for hiding this comment

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

Ah, thanks for coming back to add this. Much appreciated, Till!

@tillprochaska tillprochaska merged commit f7e97b2 into develop Oct 15, 2024
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.

2 participants