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


Python interfaces.IResourceSheet类代码示例

本文整理汇总了Python中adhocracy_core.interfaces.IResourceSheet的典型用法代码示例。如果您正苦于以下问题:Python IResourceSheet类的具体用法?Python IResourceSheet怎么用?Python IResourceSheet使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: test_create_valid

 def test_create_valid(self, inst, sheet_meta, context):
     from zope.interface.verify import verifyObject
     from adhocracy_core.interfaces import IResourceSheet
     assert inst.context == context
     assert inst.meta == sheet_meta
     assert IResourceSheet.providedBy(inst)
     assert verifyObject(IResourceSheet, inst)
开发者ID:pra85,项目名称:adhocracy3,代码行数:7,代码来源:test_init.py

示例2: test_create

    def test_create(self, meta, context):
        from zope.interface.verify import verifyObject
        from adhocracy_core.interfaces import IResourceSheet

        inst = meta.sheet_class(meta, context)
        assert IResourceSheet.providedBy(inst)
        assert verifyObject(IResourceSheet, inst)
开发者ID:pra85,项目名称:adhocracy3,代码行数:7,代码来源:test_bplan.py

示例3: test_create

 def test_create(self, meta, context):
     from zope.interface.verify import verifyObject
     from adhocracy_core.interfaces import IResourceSheet
     from . import workflow
     inst = meta.sheet_class(meta, context)
     assert isinstance(inst, workflow.WorkflowAssignmentSheet)
     assert IResourceSheet.providedBy(inst)
     assert verifyObject(IResourceSheet, inst)
开发者ID:robx,项目名称:adhocracy3.mercator,代码行数:8,代码来源:test_workflow.py

示例4: test_create

 def test_create(self, inst, context, sheet_meta):
     from . import BaseResourceSheet
     from adhocracy_core.interfaces import IResourceSheet
     from zope.interface.verify import verifyObject
     assert isinstance(inst, BaseResourceSheet)
     assert inst.context == context
     assert inst.meta == sheet_meta
     assert IResourceSheet.providedBy(inst)
     assert verifyObject(IResourceSheet, inst)
开发者ID:pra85,项目名称:adhocracy3,代码行数:9,代码来源:test_init.py

示例5: test_create_valid

 def test_create_valid(self, meta, context):
     from zope.interface.verify import verifyObject
     from adhocracy_core.interfaces import IResourceSheet
     from adhocracy_core.sheets.comment import ICommentable
     from adhocracy_core.sheets.comment import CommentableSchema
     inst = meta.sheet_class(meta, context)
     assert IResourceSheet.providedBy(inst)
     assert verifyObject(IResourceSheet, inst)
     assert inst.meta.isheet == ICommentable
     assert inst.meta.schema_class == CommentableSchema
开发者ID:libscott,项目名称:adhocracy3,代码行数:10,代码来源:test_comment.py

示例6: test_create_valid

 def test_create_valid(self, meta, context):
     from zope.interface.verify import verifyObject
     from adhocracy_core.interfaces import IResourceSheet
     from .kiezkassen import IProposal
     from .kiezkassen import ProposalSchema
     inst = meta.sheet_class(meta, context, None)
     assert IResourceSheet.providedBy(inst)
     assert verifyObject(IResourceSheet, inst)
     assert inst.meta.isheet == IProposal
     assert inst.meta.schema_class == ProposalSchema
开发者ID:Janaba,项目名称:adhocracy3,代码行数:10,代码来源:test_kiezkassen.py

示例7: test_create_valid

 def test_create_valid(self, meta, context):
     from zope.interface.verify import verifyObject
     from adhocracy_core.interfaces import IResourceSheet
     from adhocracy_core.sheets.asset import IAssetMetadata
     from adhocracy_core.sheets.asset import AssetMetadataSchema
     inst = meta.sheet_class(meta, context)
     assert IResourceSheet.providedBy(inst)
     assert verifyObject(IResourceSheet, inst)
     assert inst.meta.isheet == IAssetMetadata
     assert inst.meta.schema_class == AssetMetadataSchema
开发者ID:robx,项目名称:adhocracy3.mercator,代码行数:10,代码来源:test_asset.py

示例8: test_create_valid

 def test_create_valid(self, meta, context):
     from zope.interface.verify import verifyObject
     from adhocracy_core.interfaces import IResourceSheet
     from adhocracy_mercator.sheets.mercator import ITitle
     from adhocracy_mercator.sheets.mercator import TitleSchema
     inst = meta.sheet_class(meta, context, None)
     assert IResourceSheet.providedBy(inst)
     assert verifyObject(IResourceSheet, inst)
     assert inst.meta.isheet == ITitle
     assert inst.meta.schema_class == TitleSchema
开发者ID:Janaba,项目名称:adhocracy3,代码行数:10,代码来源:test_mercator.py

示例9: test_create_valid

 def test_create_valid(self, meta, context):
     from zope.interface.verify import verifyObject
     from adhocracy_core.interfaces import IResourceSheet
     from adhocracy_mercator.sheets.mercator import IOrganizationInfo
     from adhocracy_mercator.sheets.mercator import OrganizationInfoSchema
     inst = meta.sheet_class(meta, context)
     assert IResourceSheet.providedBy(inst)
     assert verifyObject(IResourceSheet, inst)
     assert inst.meta.isheet == IOrganizationInfo
     assert inst.meta.schema_class == OrganizationInfoSchema
开发者ID:libscott,项目名称:adhocracy3,代码行数:10,代码来源:test_mercator.py

示例10: test_create_valid

 def test_create_valid(self, registry, sheet_meta, context):
     from zope.interface.verify import verifyObject
     from adhocracy_core.interfaces import IResourceSheet
     inst = self.get_class()(sheet_meta, context, registry)
     assert inst.context == context
     assert inst.meta == sheet_meta
     assert inst.registry == registry
     assert inst.request is None
     assert inst.creating is None
     assert IResourceSheet.providedBy(inst)
     assert verifyObject(IResourceSheet, inst)
开发者ID:liqd,项目名称:adhocracy3,代码行数:11,代码来源:test_init.py

示例11: test_create

 def test_create(self, inst, meta):
     from adhocracy_core.interfaces import IResourceSheet
     from adhocracy_core.sheets.pool import IPool
     from adhocracy_core.sheets.pool import PoolSchema
     from adhocracy_core.sheets.pool import PoolSheet
     from zope.interface.verify import verifyObject
     assert isinstance(inst, PoolSheet)
     assert verifyObject(IResourceSheet, inst)
     assert IResourceSheet.providedBy(inst)
     assert meta.schema_class == PoolSchema
     assert meta.isheet == IPool
     assert meta.editable is False
     assert meta.creatable is False
开发者ID:liqd,项目名称:adhocracy3,代码行数:13,代码来源:test_pool.py

示例12: test_create

 def test_create(self, meta, context):
     from zope.interface.verify import verifyObject
     from adhocracy_core.interfaces import IResourceSheet
     from adhocracy_core.sheets.principal import IPasswordAuthentication
     from adhocracy_core.sheets.principal import PasswordAuthenticationSheet
     from adhocracy_core.sheets.principal import PasswordAuthenticationSchema
     inst = meta.sheet_class(meta, context)
     assert isinstance(inst, PasswordAuthenticationSheet)
     assert IResourceSheet.providedBy(inst)
     assert verifyObject(IResourceSheet, inst)
     assert inst.meta.isheet == IPasswordAuthentication
     assert inst.meta.schema_class == PasswordAuthenticationSchema
     assert inst.meta.permission_create == 'create_user'
开发者ID:libscott,项目名称:adhocracy3,代码行数:13,代码来源:test_principal.py


注:本文中的adhocracy_core.interfaces.IResourceSheet类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。