-
Notifications
You must be signed in to change notification settings - Fork 2
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
Feature/token refactor #23
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know it's a work in progress so probably some of the comments are not applicable. But I thought I'd check things out to guarantee alignment early on.
@hillairet This looks like a big PR, most of the changes are just moving files around in testing to support the tests for the two new tokens. This is what I have at the moment, these were just quick tests to be sure that what I changed works, but I think it could just be one unit test with different parameters for the online and offline tokens: Let me know your preference for layout! |
Cool looks like we are getting there.
Also instead of |
This should be stable now, there is one error in the typing
This comes from the I have opened a discussion with the devs on httpx as it is not clear what the input should be, but I will update this as soon as I know what's going wrong. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The README.md needs a good update.
I know I suggested that but now looking at the initialization test, I'm not sure what they are testing. We want to be testing our code, not python itself. You wrote a save token and load token for the test at you are testing that ... not sure what we are verifying here ...
It's ok to have them but they are kind of useless, at least part of the test is.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok on closer second inspection:
test_token
,test_online_token
, andtest_offline_token
are ok as they test some default valuestest_save_token
,test_load_token
,test_save_offline_token
andtest_load_offline_token
test the testing code you wrote inconftest.py
so let's remove them. Let's not maintain code testing the test code. When we have a large set of tests, we don't want to have to keep these ones up to date too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
More than I expected.
Now that there are changes ... In the docs you put online token before offline token. During the oauth we always get the offline token first since we get the app's token before we get a user's token. I'd follow the same order in the docs.
@hillairet this is something I noticed when developing using this using the current design: Since we aren't defining the |
Please make an issue for this and let's do that later. This PR doesn't have to be perfect or complete. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We might get there eventually.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉 🥳 🎊
No description provided.