6

Is there a library that supports embedded mongodb for python?

There is a version that I used in Java Embedded MongoDB when running integration tests. Now I moved onto python for another project that uses MongoDB. In my tests, I would like to start a embedded mongodb instance and run tests against this instance. Are there any such libraries in python for MongoDB?

I do not want to mock the response of DB calls, as it would be too much test code to write and too many calls would need to be mocked. So this would be my last option if I have to.

1 Answer 1

3

Yes, there is.

Mongomock is small library for mocking pymongo collection objects for testing purposes.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.