-
Notifications
You must be signed in to change notification settings - Fork 58
Dicts iterate differently on python 2 vs. 3. Let's sort. #51
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
Conversation
… very same regardless of version.
I actually manually added the I'm fine with this if tests pass, though. |
One of the tests failed; I've fixed the test. Not sure if Travis is rerunning the tests automagically... |
Tests pass. |
tests/test_webhook.py
Outdated
# Index webhooks | ||
webhooks = easypost.Webhook.all(url=expected_url) | ||
assert webhooks["webhooks"][len(webhooks["webhooks"]) - 1].id == webhook.id | ||
for wh in webhooks["webhooks"]: |
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.
how about just
assert any(wh.id == webhook.id for wh in webhooks['webhooks'])
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.
Done, thanks.
…ost-python into dlc37_unite_python2_and_3
|
||
assert report.object == "ShipmentReport" | ||
assert report.status == "available" | ||
assert report.status in ("available", "new") |
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.
Do you think this is sufficient, or will the retrieve() call fail for new reports? I can't reproduce new reports.
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 think it's sufficient. If not, we'll fix it next time it breaks.
🛳it |
Inspired by python3 test failures before @Roguelazer modernized them. The order of 'all()' changes.