def grok(module_name): config = ConfigurationMachine() zcml.do_grok('grokcore.component.meta', config) zcml.do_grok('dolmen.view.meta', config) zcml.do_grok("dolmen.location", config) zcml.do_grok("dolmen.forms.base", config) zcml.do_grok(module_name, config) config.execute_actions()
def grok(module_name): config = ConfigurationMachine() zcml.do_grok('grokcore.component.meta', config) zcml.do_grok('grokcore.security.meta', config) zcml.do_grok('grokcore.view.meta', config) zcml.do_grok('grokcore.view.templatereg', config) zcml.do_grok(module_name, config) config.execute_actions()
def grok(module_name): config = ConfigurationMachine() zcml.do_grok('grokcore.component.meta', config) zcml.do_grok('dolmen.view.meta', config) if HAS_SECURITY: zcml.do_grok('grokcore.security.meta', config) zcml.do_grok('dolmen.view.security', config) zcml.do_grok(module_name, config) config.execute_actions()
def grok(module_name): config = ConfigurationMachine() zcml.do_grok('grokcore.component.meta', config) zcml.do_grok('grokcore.site.meta', config) zcml.do_grok('grokcore.catalog.meta', config) zcml.do_grok(module_name, config) config.execute_actions()
def grok(*modules): config = ConfigurationMachine() zcml.do_grok('grokcore.component.meta', config) zcml.do_grok('dolmen.viewlet.meta', config) for name in modules: zcml.do_grok(name, config) config.execute_actions()
def grok(*module_names): config = ConfigurationMachine() zcml.do_grok('grokcore.component.compat', config) zcml.do_grok('grokcore.component.meta', config) for module_name in module_names: zcml.do_grok(module_name, config) config.execute_actions()
def grok(module_name): config = ConfigurationMachine() zcml.do_grok(module_name, config) config.execute_actions()
def grok(module_name): config = ConfigurationMachine() zcml.do_grok('grokcore.component.meta', config) zcml.do_grok('grokcore.view.meta.views', config) zcml.do_grok('grokcore.view.meta.templates', config) zcml.do_grok('grokcore.view.meta.skin', config) # Use the Five override for the page template factory # zcml.do_grok('grokcore.view.templatereg', config) zcml.do_grok('five.grok.templatereg', config) zcml.do_grok('five.grok.meta', config) zcml.do_grok(module_name, config) config.execute_actions()
def grok(module_name): config = ConfigurationMachine() zcml.do_grok('grokcore.component.meta', config) zcml.do_grok('dolmen.viewlet.meta', config) zcml.do_grok('dolmen.location', config) zcml.do_grok('dolmen.menu.meta', config) zcml.do_grok('dolmen.menu.components', config) zcml.do_grok(module_name, config) config.execute_actions()
def grok(module_name=None): """Grok a module. Test helper to 'grok' a module named by `module_name`, a dotted path to a module like ``'mypkg.mymodule'``. 'grokking' hereby means to do all the ZCML configurations triggered by directives like ``grok.context()`` etc. This is only needed if your module was not `grokked` during test setup time as it normally happens with functional tests. """ config = ConfigurationMachine() zcml.do_grok('grokcore.component.meta', config) zcml.do_grok('grokcore.security.meta', config) zcml.do_grok('grokcore.view.meta', config) zcml.do_grok('grokcore.view.templatereg', config) zcml.do_grok('grokcore.viewlet.meta', config) zcml.do_grok('grokcore.formlib.meta', config) zcml.do_grok('grokcore.annotation.meta', config) zcml.do_grok('grokcore.site.meta', config) zcml.do_grok('grokcore.catalog.meta', config) zcml.do_grok('grokcore.traverser.meta', config) zcml.do_grok('grokcore.rest.meta', config) zcml.do_grok('grokcore.xmlrpc.meta', config) if module_name is not None: zcml.do_grok(module_name, config) config.execute_actions()
def grok(self, module_name): try: zcml.do_grok(module_name, self.context) self.context.execute_actions(testing=True) finally: del self.context.actions[:]