コード例 #1
0
    def test_annotationadaptor(self):
        """Testing the the annotation adaptor."""
        annotation_adaptor = IMarginaliaAnnotatableAdaptor(self.document)

        self.assertEquals(
            isinstance(annotation_adaptor, SimpleDocumentAnnotationAdaptor),
            True, "Unable to find the Annotation Adaptor Implementation.")
        self.assertEquals(annotation_adaptor.isAnnotatable(), True,
                          "This should return True like a marker interface.")
        self.assertEquals(annotation_adaptor.getBodyText(), u"body text",
                          "This should return True like a marker interface.")
コード例 #2
0
    def test_annotationadaptor(self):
        """Testing the the annotation adaptor."""
        annotation_adaptor = IMarginaliaAnnotatableAdaptor(self.document)

        self.assertEquals(isinstance(annotation_adaptor,
                                     SimpleDocumentAnnotationAdaptor), True,
                          "Unable to find the Annotation Adaptor Implementation.")
        self.assertEquals(annotation_adaptor.isAnnotatable(), True,
                          "This should return True like a marker interface.")
        self.assertEquals(annotation_adaptor.getBodyText(), u"body text",
                          "This should return True like a marker interface.")
コード例 #3
0
ファイル: templates.py プロジェクト: mohalfaki/bungeni-portal
 def getAnnotatedUrl(self):
     """Returns a boolean True"""
     obj = IMarginaliaAnnotatableAdaptor(self.context)
     return obj.getAnnotatedUrl(self.request)
コード例 #4
0
ファイル: templates.py プロジェクト: mohalfaki/bungeni-portal
 def isAnnotatable(self):
     """Returns a boolean True"""
     obj = IMarginaliaAnnotatableAdaptor(self.context)
     return obj.isAnnotatable()
コード例 #5
0
ファイル: templates.py プロジェクト: mohalfaki/bungeni-portal
 def getTitle(self):
     """Returns annotated url."""
     obj = IMarginaliaAnnotatableAdaptor(self.context)
     return obj.getTitle()
コード例 #6
0
ファイル: templates.py プロジェクト: mohalfaki/bungeni-portal
 def getBaseUrl(self):
     obj = IMarginaliaAnnotatableAdaptor(self.context)
     return obj.getAnnotatedUrl(self.request)