Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add tests for oauth flows during fitbit polling (and fix bug about missing await). #61

Merged
merged 2 commits into from
Mar 3, 2024

Conversation

caarmen
Copy link
Owner

@caarmen caarmen commented Mar 3, 2024

Add tests for certain oauth flows during fitbit polling:

  • successful token refresh
  • token refresh fail
  • user logged out

These tests are a bit of copy/paste from other tests:

  • routes/test_fitbit_oauth: we copy most of the test scenario, except the part about receiving the webhook about new fitbit data
  • tasks/test_fitbit_poll: we copy just the part about polling for activity (instead of the using the webhook).

In the first commit, the tests fail, because of a missing await on a coroutine call in the polling code.

The second commit fixes this.

caarmen added 2 commits March 3, 2024 22:07
Add tests for certain oauth flows during fitbit polling:
* successful token refresh
* token refresh fail
* user logged out

These tests are a bit of copy/paste from other tests:
* routes/test_fitbit_oauth: we copy most of the test scenario, except the part about receiving the webhook about new fitbit data
* tasks/test_fitbit_poll: we copy just the part about polling for activity (instead of the using the webhook).

Note that these tests currently fail, because we're missing an `await` on a coroutine call in the polling code. This will be fixed in the next commit.
@caarmen caarmen changed the title Add tests for oauth flows during fitbit polling (and bug about missing await). Add tests for oauth flows during fitbit polling (and fix bug about missing await). Mar 3, 2024
@caarmen caarmen marked this pull request as ready for review March 3, 2024 21:14
@caarmen caarmen merged commit 2ba9271 into main Mar 3, 2024
2 checks passed
@caarmen caarmen deleted the fix-fitbit-logout-message-during-poll branch March 3, 2024 21:17
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