当前位置: 首页>>代码示例>>Python>>正文


Python IContentListingObject.get_preview_image_url方法代码示例

本文整理汇总了Python中plone.app.contentlisting.interfaces.IContentListingObject.get_preview_image_url方法的典型用法代码示例。如果您正苦于以下问题:Python IContentListingObject.get_preview_image_url方法的具体用法?Python IContentListingObject.get_preview_image_url怎么用?Python IContentListingObject.get_preview_image_url使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在plone.app.contentlisting.interfaces.IContentListingObject的用法示例。


在下文中一共展示了IContentListingObject.get_preview_image_url方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: TestOpengeverContentListingWithEnabledBumblebee

# 需要导入模块: from plone.app.contentlisting.interfaces import IContentListingObject [as 别名]
# 或者: from plone.app.contentlisting.interfaces.IContentListingObject import get_preview_image_url [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_preview_image_url [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_preview_image_url方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。