-
Notifications
You must be signed in to change notification settings - Fork 333
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
Project missing fields in a nested dict fix #605
Project missing fields in a nested dict fix #605
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #605 +/- ##
========================================
Coverage 94.69% 94.69%
========================================
Files 16 16
Lines 3187 3187
========================================
Hits 3018 3018
Misses 169 169
Continue to review full report at Codecov.
|
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 finding the bug and fixing it.
@@ -3068,6 +3068,17 @@ def test__aggregate_project_missing_fields(self): | |||
]) | |||
self.assertEqual([{}], list(actual)) | |||
|
|||
def test__aggregate_project_missing_nested_fields(self): |
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.
Please add an equivalent test in test__mongomock
to ensure the behavior is kept the same between pymongo
and mongomock
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
Added similar testcase to test_mongomock |
Current behavior of mongomock is "Ignore the whole dictionary if we couldn't find a single key"
That's not what the real mongo does
The real mongo just ignores this missing key