-
Notifications
You must be signed in to change notification settings - Fork 44
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
Non Local Mongo #150
Non Local Mongo #150
Conversation
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.
Looks good to me, thanks @shyamd! :)
else: | ||
from mongomock import MongoClient | ||
|
||
client = MongoClient() | ||
client = MongoClient() |
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.
Is this not a possibility in mongomock
? Or maybe it just doesn't make sense?
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.
It actually works fine as far as code goes, but it's probably not guaranteed behavior, so it doesn't hurt to separate the two unless we're getting issues elsewhere like linting.
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.
It was merely for the elegance of the code as it was - only having one line for the instantiation of the client - but never mind.
Ah, I see there's a test failing for blackening. Could you possibly install pre-commit (run |
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 LGTM now the checks are passing, thanks @shyamd.
This patch enables using a non-local mongo server by supplying a URI string in the config