Example #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.")
    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.")
Example #3
0
 def getAnnotatedUrl(self):
     """Returns a boolean True"""
     obj = IMarginaliaAnnotatableAdaptor(self.context)
     return obj.getAnnotatedUrl(self.request)
Example #4
0
 def isAnnotatable(self):
     """Returns a boolean True"""
     obj = IMarginaliaAnnotatableAdaptor(self.context)
     return obj.isAnnotatable()
Example #5
0
 def getTitle(self):
     """Returns annotated url."""
     obj = IMarginaliaAnnotatableAdaptor(self.context)
     return obj.getTitle()
Example #6
0
 def getBaseUrl(self):
     obj = IMarginaliaAnnotatableAdaptor(self.context)
     return obj.getAnnotatedUrl(self.request)