Example #1
0
 def test_getLink_caching_showColors(self):
     """Cache takes the 'showColors' parameter into account."""
     adapted = IPrettyLink(self.folder)
     self.assertTrue(adapted.showColors)
     self.assertTrue(u"<a class='pretty_link state-private'" in adapted.getLink())
     adapted.showColors = False
     self.assertFalse(u"<a class='pretty_link state-private'" in adapted.getLink())
Example #2
0
 def test_getLink_caching_showColors(self):
     """Cache takes the 'showColors' parameter into account."""
     adapted = IPrettyLink(self.folder)
     self.assertTrue(adapted.showColors)
     self.assertTrue(u"<span class='pretty_link_content state-private'" in
                     adapted.getLink())
     adapted.showColors = False
     self.assertFalse(u"<span class='pretty_link_content state-private'" in
                      adapted.getLink())
Example #3
0
 def adapted(self,
             showColors=False,
             display_tag_title=False,
             isViewable=True):
     plo = IPrettyLink(self.context)
     plo.showContentIcon = True
     plo.showColors = showColors
     plo.display_tag_title = display_tag_title
     plo.isViewable = isViewable
     plo.notViewableHelpMessage = ''
     return plo