pymongo-fastapi-crud
pymongo-fastapi-crud copied to clipboard
close db after dropping collection
The shutdown event handler should close the mongodb connection after dropping the collection. The problem is more apparent with Pymongo4. With Pymongo4 the unit test fails with "Cannot use MongoClient after close" error.