test_functional.py 文件源码

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

项目:kinto-wizard 作者: Kinto 项目源码 文件源码
def dump(self, bucket=None, collection=None):
        cmd = 'kinto-wizard {} --server={} --auth={}'
        dump_cmd = cmd.format("dump --full", self.server, self.auth)

        if bucket:
            dump_cmd += ' --bucket={}'.format(bucket)

        if collection:
            dump_cmd += ' --collection={}'.format(collection)

        sys.argv = dump_cmd.split(" ")
        output = io.StringIO()
        with redirect_stdout(output):
            main()
        output.flush()

        # Check that identical to original file.
        return output.getvalue()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号