test_views.py 文件源码

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

项目:django-heartbeat 作者: pbs 项目源码 文件源码
def test_disabled_auth(self):
        self.heartbeat['auth'] = {'disable': True}
        # Make factory without auth header
        self.factory = RequestFactory()
        request = self.factory.get(reverse('1337'))
        response = details(request)
        assert response.status_code == 200
        assert response['content-type'] == 'application/json'
        json_response = json.loads(response.content.decode('utf-8'))
        assert json_response['test_views']['ping'] == 'pong'
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号