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


Python setup.placelessSetUp函数代码示例

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


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

示例1: setUp

 def setUp(self):
     setup.placelessSetUp()
     provideAdapter(GenericValue)
     provideAdapter(FrobRenderer)
     provideAdapter(StructRenderer)
     provideAdapter(DictValue)
     self.addTypeEqualityFunc(str, 'assertMultiLineEqual')
开发者ID:minddistrict,项目名称:zodbbrowser,代码行数:7,代码来源:test_value.py

示例2: setUp

 def setUp(self):
     setup.placelessSetUp()
     provideUtility(FakeServerType(), name='FAKE')
     self.options = Options()
     self.options.server_type = 'FAKE'
     self.options.verbose = False
     self.db = None
开发者ID:mgedmin,项目名称:zodbbrowser,代码行数:7,代码来源:test_standalone.py

示例3: setUp

def setUp(test=None):
    """Set up for schooltool.relationship doctests.

    Calls Zope's placelessSetUp, sets up annotations and relationships.
    """
    setup.placelessSetUp()
    setup.setUpAnnotations()
    setUpRelationships()
开发者ID:asley,项目名称:schooltool,代码行数:8,代码来源:__init__.py

示例4: setUp

 def setUp(self):
     setup.placelessSetUp()
     provideAdapter(GenericState)
     provideAdapter(ZodbObjectHistory)
     RealDatabaseTest.setUp(self)
     self.obj = self.conn.root()['obj'] = SampleFolder()
     self.named_obj = self.conn.root()['named_obj'] = NamedSampleFolder()
     transaction.commit()
开发者ID:imclab,项目名称:zodbbrowser,代码行数:8,代码来源:test_state.py

示例5: setUp

 def setUp(self):
     setup.placelessSetUp()
     bucket = OOBucket()
     bucket[1] = 42
     bucket[2] = 23
     bucket[3] = 17
     state = bucket.__getstate__()
     self.state = OOBucketState(None, state, None)
开发者ID:mgedmin,项目名称:zodbbrowser,代码行数:8,代码来源:test_btreesupport.py

示例6: setUp

 def setUp(self):
     setup.placelessSetUp()
     provideAdapter(GenericState)
     RealDatabaseTest.setUp(self)
     self.obj = self.conn.root()['obj'] = SampleFolder()
     alsoProvides(self.obj, IMyInterface, IMyGoodInterface)
     sys.modules['zodbbrowser.nosuchmodule'] = sys.modules[__name__]
     transaction.commit()
     sys.modules.pop('zodbbrowser.nosuchmodule', None)
     install_provides_hack()
开发者ID:mgedmin,项目名称:zodbbrowser,代码行数:10,代码来源:test_state.py

示例7: setUp

def setUp(test):
    setup.placelessSetUp(True)
    setup.setUpTestAsModule(test, name='zojax.workflow.TESTS')

    component.provideAdapter(state.WorkflowState)
    component.provideAdapter(info.WorkflowInfo)
    component.provideHandler(workflow.initWorkflow)
    component.provideAdapter(AttributeAnnotations)
    component.provideAdapter(state.contentPermissionsMap,
                             name='workflow.state.permissions')
开发者ID:Zojax,项目名称:zojax.workflow,代码行数:10,代码来源:tests.py

示例8: setUpSecurityDirectives

def setUpSecurityDirectives(test=None):
    setup.placelessSetUp()
    zcml = ZCMLWrapper()
    zcml.include('schooltool.common', file='zcmlfiles.zcml')
    zcml.include('schooltool.securitypolicy', file='meta.zcml')
    zcml.include('schooltool.securitypolicy')
    zcml.setUp(
        namespaces={
            "": "http://namespaces.zope.org/zope",
            "security": "http://schooltool.org/securitypolicy"
            },
        i18n_domain='schooltool')
    test.globs['zcml'] = zcml
开发者ID:achouhans,项目名称:schooltool-2.8.5,代码行数:13,代码来源:test_txt.py

示例9: setUp

def setUp(test):
    setup.placelessSetUp()
    from z3c.form import testing
    testing.setupFormDefaults()
    vr = getVocabularyRegistry()
    from schooltool.basicperson.vocabularies import groupVocabularyFactory
    from schooltool.basicperson.vocabularies import advisorVocabularyFactory
    vr.register('schooltool.basicperson.group_vocabulary',
                groupVocabularyFactory())
    vr.register('schooltool.basicperson.advisor_vocabulary',
                advisorVocabularyFactory())
    setUpRelationships()
    setUpAnnotations()
开发者ID:asley,项目名称:schooltool,代码行数:13,代码来源:test_person.py

示例10: setUp

def setUp(test):
    setup.placelessSetUp()

    provideUtility(r1, name='r1')
    provideUtility(r2, name='r2')
    provideUtility(r3, name='r3')

    provideUtility(p1, name='my.p1')
    provideUtility(p2, name='my.p2')
    provideUtility(p3, name='my.p3')

    provideAdapter(AttributeAnnotations)
    provideAdapter(ObjectPermissionsMaps)
    provideAdapter(ObjectPermissionsMapsManager)
    provideAdapter(PermissionsMapManager,
                   (interface.Interface,), name='zojax.permissionsmap')
开发者ID:Zojax,项目名称:zojax.permissionsmap,代码行数:16,代码来源:tests.py

示例11: setUp

def setUp(test):
    setup.placelessSetUp()
    setUpContents()

    provideUtility(Auth())
    provideAdapter(Ownership)
    provideAdapter(manager.getPersonalSpace)
    provideHandler(manager.personalSpaceMoved)
    provideHandler(manager.principalRemovingHandler)
    provideUtility(manager.PersonalSpaceService(), name="zojax.personal.space")

    provideAdapter(ObjectMover)
    provideAdapter(ContainerItemRenamer)

    interface.classImplements(space.PersonalSpace, IOwnerAware)

    global oldMethod
    oldMethod = utils.checkPermissionForPrincipal.func_code
    utils.checkPermissionForPrincipal.func_code = checkPermissionForPrincipal.func_code
开发者ID:Zojax,项目名称:zojax.personal.space,代码行数:19,代码来源:tests.py

示例12: setUpPersistent

def setUpPersistent(test):
    setup.setUpTestAsModule(test, name='keas.kmi.tests.doctestfile')
    setup.placelessSetUp()
    provideUtility(TestingKeyManagementFacility(tempfile.mkdtemp()),
                   provides=IKeyManagementFacility)
开发者ID:jean,项目名称:keas.kmi,代码行数:5,代码来源:tests.py

示例13: setUp

def setUp(test):
    setup.placelessSetUp()
    provideAdapter(SimpleValueRenderer)
开发者ID:minddistrict,项目名称:zodbbrowser,代码行数:3,代码来源:test_diff.py

示例14: setUp

def setUp(test):
    setup.placelessSetUp()
    setup.setUpTraversal()
    setSite()
开发者ID:asley,项目名称:schooltool,代码行数:4,代码来源:test_evolve38.py

示例15: setUp

def setUp(test):
    setup.placelessSetUp()
    setUpTraversing()
    component.provideAdapter(getSession)
    component.provideAdapter(message.StatusMessage, name='statusMessage')
    component.provideUtility(RAMSessionDataContainer(), ISessionDataContainer)
开发者ID:Zojax,项目名称:zojax.statusmessage,代码行数:6,代码来源:tests.py


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