示例#1
0
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()
示例#2
0
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()
示例#3
0
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()
示例#4
0
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()
示例#5
0
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()
示例#6
0
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()
示例#7
0
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()
示例#8
0
def grok(module_name):
    config = ConfigurationMachine()
    zcml.do_grok(module_name, config)
    config.execute_actions()
示例#9
0
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()
示例#10
0
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()
示例#11
0
文件: testing.py 项目: py361/grok
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()
示例#12
0
 def grok(self, module_name):
     try:
         zcml.do_grok(module_name, self.context)
         self.context.execute_actions(testing=True)
     finally:
         del self.context.actions[:]
示例#13
0
文件: testing.py 项目: clozinski/grok
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()