-
-
Notifications
You must be signed in to change notification settings - Fork 744
Some minor style improvements and 2 test fixes #1330
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
stefaang
commented
Nov 26, 2019
- fixed the 401 or 405 assertion always returning True
- tests were failing on a fresh install without test_user
- I made it a bit more pythonic.
excellent. Tests are in dire need of refactoring (if not a complete rewrite). |
Thanks. |
@@ -184,7 +183,7 @@ def prune_aggregation_stage(d): | |||
abort(400, description="Aggregation query could not be parsed.") | |||
|
|||
for key, value in query.items(): | |||
if key[0] != "$": | |||
if key.startswith("$"): |
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.
Was this change intended or should it be if not key.startswith("$"):
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.
Hmm not intended.
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 guess this code path isn't being tested?
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 review @mic-max. Feel free to PR a fix.