views_test.py 文件源码

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

项目:bouncer 作者: hypothesis 项目源码 文件源码
def test_annotation_increments_stat_if_get_raises_not_found_error(self,
                                                                      statsd):
        request = mock_request()
        request.es.get.side_effect = es_exceptions.NotFoundError

        try:
            views.AnnotationController(request).annotation()
        except:
            pass

        statsd.incr.assert_called_once_with(
            "views.annotation.404.annotation_not_found")
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号