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")
评论列表
文章目录