michaelkryukov / mongomock_motor

Library for mocking AsyncIOMotorClient built on top of mongomock.
MIT License
94 stars 23 forks source link

Share mock client between motor and pymongo #34

Closed radifalco closed 12 months ago

radifalco commented 1 year ago

I have some code that uses both pymongo (through mongoengine) and motor together and expect to modify the same collection. If I made it so that AsyncMongoMockClient could take an already formed mock MongoClient, and then use the same client with mongoengine that it would achieve my aims? Or is that not necessary?

michaelkryukov commented 1 year ago

Hey, can you check https://github.com/michaelkryukov/mongomock_motor/pull/36? Does it satisfy your use case?