test_app.py 文件源码

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

项目:chalice 作者: aws 项目源码 文件源码
def test_can_encode_binary_body_with_header_charset(sample_app):
    response = app.Response(
        status_code=200,
        body=b'foobar',
        headers={'Content-Type': 'application/octet-stream; charset=binary'}
    )
    encoded_response = response.to_dict(sample_app.api.binary_types)
    assert encoded_response['body'] == 'Zm9vYmFy'
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号