-
Notifications
You must be signed in to change notification settings - Fork 208
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
Fixes #308 Include tenant-id when using files api (#1) #346
Conversation
* Work and test * less change * less * Use file objects and update readme * Feedback * updates * tests * remove * less * cleaner test --------- Co-authored-by: Timbo <[email protected]>
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.
This generally looks good; however, the bare exception handling in the tests needs to be cleaned up.
tests/test_filesmanager.py
Outdated
r_get.return_value = None | ||
try: | ||
xero.filesAPI.files.all() | ||
except: # NOQA: E722 |
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.
This is a bit of a red flag - bare exceptions are flagged by flake8 for a reason; and in this case, I can't see a reason we should be raising an exception at all. As best as I can make out, we just need a more realistic mock return value.
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.
Thanks for the fix!
Thanks for reviewing and merging so quickly. Any idea when the next release will be? |
There's no reliable release cadence; it's more a case of "when someone asks, or when there's enough of a backlog, whichever happens first" :-) |
Update the files api manager to include tenant-id in the header - previously would get a 403 using this api.
Updated readme command for running tests.
Added more params for the uploading file so its more inline with existing api and works with different backends (eg S3)