def test_it_returns_presented_annotation(self, AnnotationJSONPresenter, links_service, pyramid_request): annotation = mock.Mock() presenter = mock.Mock() AnnotationJSONPresenter.return_value = presenter result = views.read(annotation, pyramid_request) AnnotationJSONPresenter.assert_called_once_with( annotation, links_service) assert result == presenter.asdict()
def test_it_returns_presented_annotation(self, AnnotationJSONPresenter, pyramid_request): context = mock.Mock() presenter = mock.Mock() AnnotationJSONPresenter.return_value = presenter result = views.read(context, pyramid_request) AnnotationJSONPresenter.assert_called_once_with(context) assert result == presenter.asdict()
def test_it_returns_presented_annotation(self, AnnotationJSONPresenter, links_service, pyramid_request): annotation = mock.Mock() presenter = mock.Mock() AnnotationJSONPresenter.return_value = presenter result = views.read(annotation, pyramid_request) AnnotationJSONPresenter.assert_called_once_with(annotation, links_service) assert result == presenter.asdict()