benjhar / JokeAPI-Python

An API Wrapper for Sv443's JokeAPI
GNU General Public License v3.0
33 stars 9 forks source link

Introduce poetry with linters #8

Closed kdiri closed 3 years ago

kdiri commented 3 years ago

🎨

TODO for the next time:

benjhar commented 3 years ago

Can you tell me what the failure is? Tests are also failing for me, I just want to make sure it's consistent between us.

kdiri commented 3 years ago

My principal error is related to absence of token env variable. As I don't have it, tests are failing. If I call the method without auth_token parameter :

j.get_joke(category=["programming"]) # auth_token=token is removed

All is well.

Otherwise, there is another error (the miscellaneous category is unknown that's why the test fails.):

j.get_joke(category=["miscellaneous"]) # auth_token=token is removed
Screenshot 2021-01-05 at 12 13 15
benjhar commented 3 years ago

Tests should not fail if your token is equal to None, what are you setting the token variable as/what does getenv("token") return for you? As for the category error, I am about to push a commit that fixes that.

kdiri commented 3 years ago

Effectively. Tests are passing (except miscellaneous) even getenv("token") returns None.

benjhar commented 3 years ago

I have pushed a commit that fixes the miscellaneous category test, if you pull that you should be error free if I'm interpreting you correctly.

kdiri commented 3 years ago

Can you please tell me if you agree with the modifications or should I rollback the PR ? :)

benjhar commented 3 years ago

Apologies, I somewhat forgot about this PR, merging.

kdiri commented 3 years ago

Thanks 🙂