コード例 #1
0
def test_error_view(patch, pyramid_request):
    handle_exception = patch("h.views.errors.handle_exception")
    exception = Mock()

    result = error(exception, pyramid_request)

    handle_exception.assert_called_once_with(pyramid_request, exception)
    assert result == {}
コード例 #2
0
ファイル: errors_test.py プロジェクト: hypothesis/h
def test_error_view(patch, pyramid_request):
    handle_exception = patch("h.views.errors.handle_exception")
    exception = Mock()

    result = error(exception, pyramid_request)

    handle_exception.assert_called_once_with(pyramid_request, exception)
    assert result == {}