main.py 文件源码

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

项目:chalupas 作者: Antojitos 项目源码 文件源码
def test_rst_to_html(self):
        """RST to HTML"""

        self.set_original_document_from_file('demo.rst')

        response = self.app.post('/convert/',
                buffered=True,
                content_type='multipart/form-data',
                data={
                    'document': (self.original_document, self.original_document_name),
                    'from': 'rst',
                    'to': 'html'
                })

        destination_document = response.data

        assert '200' in response.status
        assert 'text/html' in response.content_type
        assert magic.from_buffer(destination_document, mime=True) == 'text/html'
        assert os.listdir(app.config['CONVERSION_FOLDER']) == []
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号