def setUp(test): site = setup.placefulSetUp(True) site.__name__ = u'portal' setup.setUpTestAsModule(test, name='zojax.principal.users.TESTS') setUpContents() pau = PluggableAuthentication('xyz_') component.provideUtility(pau, IAuthentication) component.provideAdapter(SiteManagerAdapter) component.provideAdapter(FoundPrincipalFactory) component.provideAdapter(foundsubscriber.getInternalPrincipal) component.provideHandler(foundsubscriber.foundPrincipalCreated) component.provideAdapter(adapters.PrincipalLogin) component.provideAdapter(adapters.PasswordChanger) component.provideAdapter(adapters.PrincipalMailAddress) component.provideUtility(adapters.PrincipalByLogin(), name='zojax.principal.users.principals') component.provideUtility(adapters.PrincipalByEMail(), name='zojax.principal.users.principals') ptool = PasswordTool() ptool.passwordManager = 'MD5' component.provideUtility(ptool)
def setUp(test): setup.placefulSetUp(True) setUpDublinCore() component.provideAdapter(storage.Storage) component.provideAdapter(AttributeAnnotations) hooks.setHooks() setup.setUpTraversal() setup.setUpSiteManagerLookup() setup.setUpTestAsModule(test, 'zojax.content.model.README') # generate extension ExtensionClass = ExtensionType( "content.model", IViewModelExtension, ViewModelExtension, "View Model", "View model extension.", layer=interface.Interface) # register adater component.provideAdapter( Wrapper(ExtensionClass), (interface.Interface, interface.Interface, ExtensionMarker), IViewModelExtension) # register vocabulary getVocabularyRegistry().register( 'zojax.content.model-list', Models()) component.provideAdapter( Renderer, (IViewModelSupport, interface.Interface), interface.Interface, name='index.html')
def setUp(test): placelesssetup.setUp(test) setUpContents() component.provideAdapter( AnnotationPrincipalPermissionManager, (interface.Interface,)) setup.setUpTestAsModule(test, 'zojax.content.permissions.TESTS')
def setUp(test): setup.placefulSetUp(True) component.provideAdapter(storage.Storage) component.provideAdapter(AttributeAnnotations) hooks.setHooks() setup.setUpTraversal() setup.setUpSiteManagerLookup() setup.setUpTestAsModule(test, 'zojax.extensions.README')
def setUp(test): root = setup.placefulSetUp(site=True) root.__name__ = 'root' test.globs['root'] = root component.provideAdapter(pagelet.queryDefaultView) component.provideAdapter(pagelet.PageletPublisher, name='pagelet') component.provideAdapter(pagelet.PageletObjectPublisher,name='pageletObject') component.provideUtility(expressions.path_translator, name='path') setup.setUpTestAsModule(test, 'zojax.layout.TESTS')
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')
def setUp(test): setHooks() setup.setUpTraversal() setup.setUpSiteManagerLookup() site = setup.placefulSetUp(True) site.__name__ = u'portal' component.provideAdapter( PrincipalAnnotations, (IPrincipal,), IAnnotations) component.provideAdapter(getMessageStorage) setup.setUpTestAsModule(test, name='zojax.messaging.TESTS')
def setUpAuth(test): site = setup.placefulSetUp(True) site.__name__ = u'portal' component.provideAdapter(session.ClientId) component.provideAdapter(principalinfo.getPrincipalInfoStorage) component.provideUtility( principalinfo.RAMCachePrincipalInfoStorage(), name='ram') setup.setUpTestAsModule(test, name='zojax.authentication.TESTS')
def setUp(test): setup.placefulSetUp(True) component.provideAdapter(ObjectCopier) component.provideHandler(objectEventNotify) component.provideHandler( changeSiteConfigurationAfterMove, (ISite, IObjectMovedEvent)) component.provideHandler( dispatchToSublocations, (ILocation, IObjectMovedEvent)) setUpControlPanel() setup.setUpTestAsModule(test, 'zojax.controlpanel.README')
def setUp(test): placelesssetup.setUp(test) provideInterface("Test content types", ITestContentType, interfaces.IContentTypeType) setUpContents() component.provideAdapter( AnnotationPrincipalPermissionManager, (interface.Interface,)) component.provideAdapter(TitleBasedNameChooser) component.provideHandler(order.itemMoved) component.provideAdapter(order.Reordable, provides=interfaces.IOrder) component.provideAdapter(ContentSearchableText) setup.setUpTestAsModule(test, 'zojax.content.TESTS')
def setUp(test): placelesssetup.setUp() # Register Renderer Components ztapi.provideUtility(IFactory, ReStructuredTextSourceFactory, 'zope.source.rest') ztapi.browserView(IReStructuredTextSource, '', ReStructuredTextToHTMLRenderer) # Cheat and register the ReST renderer as the STX one as well. ztapi.provideUtility(IFactory, ReStructuredTextSourceFactory, 'zope.source.stx') ztapi.browserView(IReStructuredTextSource, '', ReStructuredTextToHTMLRenderer) setup.setUpTestAsModule(test, 'zope.app.apidoc.doctest')
def setUp(test): site = setup.placefulSetUp(True) component.provideAdapter(storage.Storage) component.provideAdapter(AttributeAnnotations) component.provideUtility(expressions.path_translator, name='path') ext = extensiontype.ExtensionType( 'portlets', interfaces.IPortletsExtension, extension.PortletsExtension, 'Portlets', u'') component.provideAdapter(ext, (IExtensible,), interfaces.IPortletsExtension) setup.setUpTestAsModule(test, name='zojax.portlet.TESTS') getVocabularyRegistry().register('zojax portlets', vocabulary.Portlets())
def setUp(test): placelesssetup.setUp(test) component.provideUtility( fileresource.filefactory, IResourceFactoryType) component.provideUtility(inplace.packageFactory, name='inplace') component.provideUtility(inplace.resourceFactory, name='inplace') component.provideUtility(javascript.packageFactory, name='javascript') component.provideUtility(javascript.resourceFactory, name='javascript') component.provideUtility(stylesheet.packageFactory, name='stylesheet') component.provideUtility(stylesheet.resourceFactory, name='stylesheet') component.provideAdapter(view, (None, None), ITraversable, name="view") setup.setUpTestAsModule(test, 'zojax.resourcepackage.TESTS')
def setUp(test): eventsSetUp(test) site = setup.placefulSetUp(True) setup.setUpTestAsModule(test, name='zojax.richtext.TESTS') component.provideUtility( plaintext.PlainTextRenderer(), name='zope.source.plaintext') component.provideUtility( html.HTMLRenderer(), name="zope.source.html") component.provideUtility( rest.ReStructuredTextRenderer(), name="zope.source.rest") component.provideUtility( stx.StructuredTextRenderer(), name="zope.source.stx") component.provideUtility( htmlsource.HTMLSourceFactory, name="zope.source.html")
def setUp(test): site = setup.placefulSetUp(True) site.__name__ = u'portal' setSite(site) sm = site.getSiteManager() # PluggableAuthentication pau = PluggableAuthentication(u'') event.notify(ObjectCreatedEvent(pau)) sm[u'auth'] = pau sm.registerUtility(pau, IAuthentication) # Credentials Plugin defaultCreds.install() defaultCreds.activate() setup.setUpTestAsModule(test, name='zojax.authentication.TESTS')
def setUp(test): testing.setUp(test) setup.setUpTestAsModule(test, 'zojax.preferences.README')
def setUp(test): setup.setUpTestAsModule(test, 'zope.app.publisher.xmlrpc.README')
def setUp(test): setup.placefulSetUp() setup.setUpTestAsModule(test, 'zojax.pageelement.TESTS') component.provideHandler(objectEventNotify)
def setUp(test): setup.placefulSetUp(True) setup.setUpTestAsModule(test, 'zojax.product.README') setUpControlPanel()
def setUp(test): testing.setUp(test) setup.setUpTestAsModule(test, 'zope.app.preference.README')
def setUp(test): site = setup.placefulSetUp(True) component.provideAdapter(header.ColumnHeader) setup.setUpTestAsModule(test, name='zojax.table.TESTS')
def setUp(test): site = setup.placefulSetUp(site=True) setup.setUpTestAsModule(test, 'zojax.skintool.README') site['intid'] = IntIds() component.provideUtility(site['intid'], IIntIds) setUpControlPanel()
def directivesSetUp(test): setUp(test) setup.setUpTestAsModule(test, 'zope.viewlet.directives')
def xmlSetUp(test): setUpTestAsModule(test, 'zope.app.testing.xmlrpc.README')
def setUpPersistent(test): setup.setUpTestAsModule(test, name='keas.kmi.tests.doctestfile') setup.placelessSetUp() provideUtility(TestingKeyManagementFacility(tempfile.mkdtemp()), provides=IKeyManagementFacility)
def setUp(test): site = setup.placefulSetUp(True) setup.setUpTestAsModule(test, name='zojax.filefield.TESTS') test.globs['deepcopy'] = deepcopy
def setUp(test): site = setup.placefulSetUp(True) site.__name__ = u'portal' installAuthentication(site) setup.setUpTestAsModule(test, name='zojax.principal.registration.TESTS')
def setUp(test): setUpTestAsModule(test, name='__builtin__')
def setUp(test): setup.setUpTestAsModule(test, 'zope.app.xmlrpcintrospection.README')
def setUp(test): placelesssetup.setUp(test) setUpContents() setup.setUpTestAsModule(test, 'zojax.content.draft.TESTS')