test_mongo_collection.py 文件源码

python
阅读 20 收藏 0 点赞 0 评论 0

项目:smappdragon 作者: SMAPPNYU 项目源码 文件源码
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)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号