code: def drop_all_tables(self):
          
  
          # Retrieve database name from application config
          app = self.db.app
          mongo_settings = app.config['MONGODB_SETTINGS']
          database_name = mongo_settings['db']
  
          # Flask-MongoEngine is built on MongoEngine, which is built on PyMongo.
          # To drop database collections, we need to access the PyMongo Database object,
          # which is stored in the PyMongo MongoClient object,
          # which is stored in app.extensions['mongoengine'][self]['conn']
          py_mongo_mongo_client = app.extensions['mongoengine'][self.db]['conn']
          py_mongo_database = py_mongo_mongo_client[database_name]
  
          # Use the PyMongo Database object
          for collection_name in py_mongo_database.collection_names():
              py_mongo_database.drop_collection(collection_name)
docs: Drop all document collections of the database.
  
          .. warning:: ALL DATA WILL BE LOST. Use only for automated testing.