當前位置: 首頁>>代碼示例>>Python>>正文


Python IContentListingObject.get_overlay_title方法代碼示例

本文整理匯總了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())
開發者ID:,項目名稱:,代碼行數:31,代碼來源:

示例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())
開發者ID:,項目名稱:,代碼行數:25,代碼來源:


注:本文中的plone.app.contentlisting.interfaces.IContentListingObject.get_overlay_title方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。