本文整理汇总了Python中plone.app.contentlisting.interfaces.IContentListingObject.get_overlay_title方法的典型用法代码示例。如果您正苦于以下问题:Python IContentListingObject.get_overlay_title方法的具体用法?Python IContentListingObject.get_overlay_title怎么用?Python IContentListingObject.get_overlay_title使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类plone.app.contentlisting.interfaces.IContentListingObject
的用法示例。
在下文中一共展示了IContentListingObject.get_overlay_title方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: TestOpengeverContentListingWithEnabledBumblebee
# 需要导入模块: from plone.app.contentlisting.interfaces import IContentListingObject [as 别名]
# 或者: from plone.app.contentlisting.interfaces.IContentListingObject import get_overlay_title [as 别名]
class TestOpengeverContentListingWithEnabledBumblebee(FunctionalTestCase):
layer = OPENGEVER_FUNCTIONAL_BUMBLEBEE_LAYER
def setUp(self):
super(TestOpengeverContentListingWithEnabledBumblebee, self).setUp()
document = create(Builder('document')
.with_dummy_content())
self.obj = IContentListingObject(obj2brain(document))
def test_documents_are_bumblebeeable(self):
self.assertTrue(self.obj.is_bumblebeeable())
def test_dossiers_are_not_bumblebeeable(self):
dossier = create(Builder('dossier'))
listing = IContentListingObject(obj2brain(dossier))
self.assertFalse(listing.is_bumblebeeable())
def test_get_preview_image_url(self):
self.assertIsNotNone(self.obj.get_preview_image_url())
def test_get_overlay_title(self):
self.assertEqual(u'Testdokum\xe4nt', self.obj.get_overlay_title())
def test_get_overlay_url(self):
self.assertEqual('http://nohost/plone/document-1/@@bumblebee-overlay-listing',
self.obj.get_overlay_url())
示例2: TestOpengeverContentListingWithDisabledBumblebee
# 需要导入模块: from plone.app.contentlisting.interfaces import IContentListingObject [as 别名]
# 或者: from plone.app.contentlisting.interfaces.IContentListingObject import get_overlay_title [as 别名]
class TestOpengeverContentListingWithDisabledBumblebee(FunctionalTestCase):
def setUp(self):
super(TestOpengeverContentListingWithDisabledBumblebee, self).setUp()
document = create(Builder('document'))
self.obj = IContentListingObject(obj2brain(document))
def test_documents_are_not_bumblebeeable(self):
self.assertFalse(self.obj.is_bumblebeeable())
def test_get_css_classes(self):
self.assertEqual('state-document-state-draft',
self.obj.get_css_classes())
def test_get_preview_image_url(self):
self.assertIsNone(self.obj.get_preview_image_url())
def test_get_overlay_title(self):
self.assertIsNone(self.obj.get_overlay_title())
def test_get_overlay_url(self):
self.assertIsNone(self.obj.get_overlay_url())