Mongo-Thingy is a sync + async ODM that already has Mongomock and Motor as supported backends, so I really would love to add mongomock-motor to the list. :)
This PR fixes the errors that are raised by our test suite when adding mongomock-motor to the list of tested backends (see here if you're curious).
Basically, we just handle a few more things that should be interesting in other situations too:
AsyncCursor.clone() and AsyncCursor.distinct() that are missing;
AsyncMongoMockCollection.database that doesn't return an AsyncMongoMockDatabase but the underlying class instead;
as well as AsyncMongoMockCollection.__eq__ and AsyncMongoMockDatabase.__eq__ that are missing.
It also adds a test file for Mongo-Thingy, inspired by test_umongo.py, in case you want to keep the compatibility alive.
Hey there, thanks for the great library!
Mongo-Thingy is a sync + async ODM that already has Mongomock and Motor as supported backends, so I really would love to add mongomock-motor to the list. :)
This PR fixes the errors that are raised by our test suite when adding mongomock-motor to the list of tested backends (see here if you're curious).
Basically, we just handle a few more things that should be interesting in other situations too:
AsyncCursor.clone()
andAsyncCursor.distinct()
that are missing;AsyncMongoMockCollection.database
that doesn't return anAsyncMongoMockDatabase
but the underlying class instead;AsyncMongoMockCollection.__eq__
andAsyncMongoMockDatabase.__eq__
that are missing.It also adds a test file for Mongo-Thingy, inspired by
test_umongo.py
, in case you want to keep the compatibility alive.