I recommend using mongomock for mocking mongodb. It’s basically an in-memory mongodb with pymongo interface and made specifically for this purpose.
https://github.com/mongomock/mongomock
I recommend using mongomock for mocking mongodb. It’s basically an in-memory mongodb with pymongo interface and made specifically for this purpose.
https://github.com/mongomock/mongomock