Ejemplo n.º 1
0
 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)
Ejemplo n.º 2
0
    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)
Ejemplo n.º 3
0
 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)
Ejemplo n.º 4
0
 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)
Ejemplo n.º 5
0
 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)
Ejemplo n.º 6
0
 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)
Ejemplo n.º 7
0
 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)
Ejemplo n.º 8
0
 def test_create_valid(self, meta, context):
     from zope.interface.verify import verifyObject
     from adhocracy_core.interfaces import IResourceSheet
     from adhocracy_core.sheets.versions import IVersionable
     from adhocracy_core.sheets.versions import VersionableSchema
     inst = meta.sheet_class(meta, context)
     assert IResourceSheet.providedBy(inst)
     assert verifyObject(IResourceSheet, inst)
     assert inst.meta.isheet == IVersionable
     assert inst.meta.schema_class == VersionableSchema
Ejemplo n.º 9
0
 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
Ejemplo n.º 10
0
 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
Ejemplo n.º 11
0
 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
Ejemplo n.º 12
0
 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
Ejemplo n.º 13
0
 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, None)
     assert IResourceSheet.providedBy(inst)
     assert verifyObject(IResourceSheet, inst)
     assert inst.meta.isheet == IOrganizationInfo
     assert inst.meta.schema_class == OrganizationInfoSchema
Ejemplo n.º 14
0
 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 IExperience
     from adhocracy_mercator.sheets.mercator import ExperienceSchema
     inst = meta.sheet_class(meta, context)
     assert IResourceSheet.providedBy(inst)
     assert verifyObject(IResourceSheet, inst)
     assert inst.meta.isheet == IExperience
     assert inst.meta.schema_class == ExperienceSchema
Ejemplo n.º 15
0
 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
Ejemplo n.º 16
0
 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
Ejemplo n.º 17
0
 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)
Ejemplo n.º 18
0
 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'
Ejemplo n.º 19
0
 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
Ejemplo n.º 20
0
 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'
Ejemplo n.º 21
0
 def test_create(self, context, meta):
     from adhocracy_core.sheets.pool import pool_meta
     inst = pool_meta.sheet_class(pool_meta, context)
     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 inst.meta.schema_class == PoolSchema
     assert inst.meta.isheet == IPool
     assert inst.meta.editable is False
     assert inst.meta.creatable is False
Ejemplo n.º 22
0
 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)