michaelkryukov / mongomock_motor

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

Add index_information to mocked methods #1

Closed tclasen closed 2 years ago

tclasen commented 2 years ago

This mocked method is required by the beanie ODM. This PR by itself isn't enough to make this new mock fully compatible, we will also need to patch Beanie to support the runtime type checking of mocked objects.

https://github.com/roman-right/beanie/ https://github.com/roman-right/beanie/blob/2e104ee9602624b7c5e694e3f0a5f56a8a39d924/beanie/odm/settings/collection.py#L71

michaelkryukov commented 2 years ago

Thanks for your contribution! I took some time to look into the issue and made a more complete MR based on this one with support for the beanie (at least now example from beanie's repository works). You can check #2 and leave your comments there. I am planning to merge it shortly if no issues will surface.