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
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