test_views.py 文件源码

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

项目:network-pulse-api 作者: mozilla 项目源码 文件源码
def test_force_json(self):
        """
        We should only allow JSON content-types in this view and reject others
        """
        response = self.client.post('/api/pulse/entries/', content_type=MULTIPART_CONTENT)
        self.assertEqual(response.status_code, status.HTTP_415_UNSUPPORTED_MEDIA_TYPE)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号