class LocalDbTest(unittest.TestCase): #準備 def setUp(self): logging.basicConfig(level=logging.INFO) self.mongodb = MongoDb() #收尾 def tearDown(self): pass #測試 取得 mongo db client def test_getMongoDbClient(self): logging.info("LocalDbTest.test_getMongoDbClient") self.assertIsNotNone(self.mongodb.getClient())
def setUp(self): logging.basicConfig(level=logging.INFO) self.mongodb = MongoDb()