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

Fix 7TV exception when streamer has no emotes #2448

Merged
merged 6 commits into from May 2, 2023

Conversation

pajlada
Copy link
Member

@pajlada pajlada commented May 1, 2023

Pull request checklist:

  • CHANGELOG.md was updated, if applicable
  • Documentation in docs/ or install-docs/ was updated, if applicable
  • I have tested all changes

Fixes #2440

This is a lot of code to fix the mentioned issue, but it adds a stricter typing (my favourite python word) for the response we receive from the API.
We ignore extra fields that we don't declare in model.py.

This PR adds some 'integration tests' that can be run by setting the PAJBOT_RUN_INTEGRATION_TESTS environment variable to 1 before running pytest, which allows you to test the fetch_* 7TV functions

These fail atm, and can be run by setting the
`PAJBOT_RUN_INTEGRATION_TESTS` environment variable to `1`
edge-cases include user who logged into 7tv but doesn't have an emote
set, or user who logged into 7tv, created an emote set, but didn't add
any emotes
@pajlada
Copy link
Member Author

pajlada commented May 2, 2023

image

@pajlada pajlada merged commit b9c0a77 into master May 2, 2023
10 checks passed
@pajlada pajlada deleted the fix/7tv-exception-when-streamer-has-no-emotes branch May 2, 2023 07:26
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.

Encountering an uncaught expcetion upon trying to fetch 7tv emotes for channel with no channel emotes
1 participant