Skip to content
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

add support for mergeObjects operator #689

Merged
merged 6 commits into from
Jan 18, 2021

Conversation

elbehery95
Copy link
Contributor

As per #642

The current implementation follows the operator as defined such that on all null an empty doc is returned, and the docs are merged using dict.update method

Copy link
Member

@pcorpet pcorpet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your PR.

Please add multiple tests in test__mongomock to ensure there are no regressions in the future.

@elbehery95
Copy link
Contributor Author

removed mergeobjects exception checking tests and added a single test__merge_objects under the aggregate tests

@pcorpet
Copy link
Member

pcorpet commented Jan 16, 2021

Thanks, almost there. Please fix the remaining styling issues
https://travis-ci.org/github/mongomock/mongomock/jobs/754673610

@codecov
Copy link

codecov bot commented Jan 16, 2021

Codecov Report

Merging #689 (9f15d1b) into develop (fac6470) will decrease coverage by 0.10%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #689      +/-   ##
===========================================
- Coverage    95.45%   95.34%   -0.11%     
===========================================
  Files           19       19              
  Lines         3605     3612       +7     
===========================================
+ Hits          3441     3444       +3     
- Misses         164      168       +4     
Impacted Files Coverage Δ
mongomock/aggregate.py 97.25% <100.00%> (-0.32%) ⬇️
mongomock/collection.py 92.40% <0.00%> (-0.08%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fac6470...9f15d1b. Read the comment docs.

@pcorpet pcorpet merged commit 8caa800 into mongomock:develop Jan 18, 2021
@pcorpet
Copy link
Member

pcorpet commented Jan 18, 2021

Thanks @elbehery95 for the hard work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants