test_exports.py 文件源码

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

项目:formpack 作者: kobotoolbox 项目源码 文件源码
def test_csv_with_tag_headers(self):
        title, schemas, submissions = build_fixture('dietary_needs')
        fp = FormPack(schemas, title)
        options = {'versions': 'dietv1', 'tag_cols_for_header': ['hxl']}
        rows = list(fp.export(**options).to_csv(submissions))
        assert rows[1] == (u'"#loc +name";"#indicator +diet";'
                           u'"#indicator +diet";"#indicator +diet";'
                           u'"#indicator +diet";"#indicator +diet"')

    # disabled for now
    # @raises(RuntimeError)
    # def test_csv_on_repeatable_groups(self):
    #     title, schemas, submissions = build_fixture('grouped_repeatable')
    #     fp = FormPack(schemas, title)
    #     options = {'versions': 'rgv1'}
    #     list(fp.export(**options).to_csv(submissions))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号