Ejemplo n.º 1
0
    def test_it_returns_presented_annotation(self, annotation_json_service,
                                             pyramid_request,
                                             annotation_context):
        result = views.read(annotation_context, pyramid_request)

        annotation_json_service.present_for_user.assert_called_once_with(
            annotation=annotation_context.annotation,
            user=pyramid_request.user)
        assert result == annotation_json_service.present_for_user.return_value
Ejemplo n.º 2
0
    def test_it_returns_presented_annotation(self, presentation_service,
                                             pyramid_request):
        context = mock.Mock()

        result = views.read(context, pyramid_request)

        presentation_service.present.assert_called_once_with(context)

        assert result == presentation_service.present.return_value
Ejemplo n.º 3
0
    def test_it_returns_presented_annotation(self,
                                             presentation_service,
                                             pyramid_request):
        context = mock.Mock()

        result = views.read(context, pyramid_request)

        presentation_service.present.assert_called_once_with(context)

        assert result == presentation_service.present.return_value