MongoEngine / eve-mongoengine

An Eve extension for MongoEngine ODM support
Other
39 stars 28 forks source link

Don't break if authentication settings are missing #5

Closed aequitas closed 10 years ago

aequitas commented 10 years ago

When MONGO_USERNAME or MONGO_PASSWORD is not supplied in the app config it breaks with an KeyError. This should prevent that.

hellerstanislav commented 10 years ago

Hello, could you provide test, when eve-mongoengine is failing on this issue? I think that eve adds MONGO_USER and MONGO_PASSWORD with None values by default.

Of course your patch makes sense, but I am just curious in which case it breaks.

aequitas commented 10 years ago

I stumbled upon this while running tests for my app. Might be I am mocking out the part which sets the default settings. I will have a look at it and provide a test if needed.

aequitas commented 10 years ago

I was mocking out to much :)