docstr: Instantiate the adapter before any tests in the test case run.
docstr_tok: ["Instantiate","the","adapter","before","any","tests","in","the","test","case","run","."]
code: def setUpClass(cls):
      """
      Instantiate the adapter before any tests in the test case run.
      """
      from pymongo.errors import ServerSelectionTimeoutError
      from pymongo import MongoClient
  
      cls.has_mongo_connection = False
  
      try:
          client = MongoClient(serverSelectionTimeoutMS=0.1)
          client.server_info()
  
          cls.adapter = MongoDatabaseAdapter(
              database_uri="mongodb://localhost:27017/chatterbot_test_database"
          )
  
          cls.has_mongo_connection = True
  
      except ServerSelectionTimeoutError:
          pass
  
imports: from unittest import TestCase
  from chatterbot.storage import MongoDatabaseAdapter
  from chatterbot.conversation import Statement
label_desc: Use image node_id 1 for calling the MongoAdapterTestCase obj's underlying member method code with example usage: obj.setUpClass(cls) without return types