-
Notifications
You must be signed in to change notification settings - Fork 175
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
Default AUTH_MECHANISM #93
Conversation
I don't quite follow why this didn't work with a custom prefix, do you understand that? |
If you specify any auth params(user/pass) it tries to get the It's also the case when you don't use a custom prefix (have also added a test for this).
|
|
||
assert mongo.db.name == 'test_db', 'wrong dbname: %s' % mongo.db.name | ||
|
||
if pymongo.version_tuple[0] > 2: |
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 the else
ever going to be hit? I suspect you mean if pymongo.version_tuple[0] == 2:
here and L196?
EDIT: oh, right, I need coffee. this is a little confusing so I'd slightly prefer if you would make this ">= 3" to avoid my brain's bugs.
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.
sure - i actually copied an earlier test, so should I update that one too
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.
Ah, so it is -- OK, I don't love that, but won't hold this up any more.
Thanks for the fix here! |
Sets default AUTH_MECHANISM values when using non URI configuration method.
Without this, trying to configure pymongo using a configuration prefix causes a KeyError
(Now with added tests)