def test_pass_in_mongo(self):
mongo_to_pass = pymongo.MongoClient(config['mongo']['host'], int(config['mongo']['port']))
collection = MongoCollection(
config['mongo']['user'],
config['mongo']['password'],
config['mongo']['database'],
config['mongo']['collection'],
passed_mongo=mongo_to_pass
)
self.assertTrue(len(list(collection.set_limit(10).get_iterator())) > 0)
评论列表
文章目录