本文整理汇总了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)
示例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)
示例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)
示例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)
示例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
示例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
示例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
示例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
示例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
示例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)
示例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
示例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'