本文整理匯總了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())