Skip to content

Commit

Permalink
Always get JWT after getting access token
Browse files Browse the repository at this point in the history
Hopefully fixes push CI failure (intermittent?)
https://github.com/MushroomObserver/mushroom-observer/actions/runs/10433557690/job/28898401164?pr=2150
How did this ever pass? Guess: stubs persist among test methods.
One method's stub of jwt was used by another test.
  • Loading branch information
JoeCohen committed Aug 17, 2024
1 parent d19fc97 commit 07d340a
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,7 @@ def test_import_multiple

simulate_authorization(user: user, inat_import_ids: inat_import_ids)
stub_access_token_request
stub_jwt_request
stub_inat_api_request(inat_import_ids, mock_inat_response)

params = { inat_ids: inat_import_ids, code: "MockCode" }
Expand Down Expand Up @@ -384,6 +385,7 @@ def test_import_all
simulate_authorization(user: user, inat_import_ids: inat_import_ids,
import_all: true)
stub_access_token_request
stub_jwt_request
stub_inat_api_request(inat_import_ids, mock_search_result)

params = { inat_ids: inat_import_ids, code: "MockCode" }
Expand Down Expand Up @@ -421,9 +423,9 @@ def import_mock_observation(filename)
inat_username: inat_obs.inat_user_login,
inat_import_ids: inat_import_ids)
stub_access_token_request
stub_jwt_request
stub_inat_api_request(inat_import_ids, mock_search_result,
inat_user_login: inat_obs.inat_user_login)
stub_jwt_request

params = { inat_ids: inat_import_ids, code: "MockCode" }
login(user.login)
Expand Down

0 comments on commit 07d340a

Please sign in to comment.