From 0dc26efaddf70c02cac7e84245666340f13abd29 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Fri, 16 Oct 2009 00:47:13 +0000 Subject: - Add ``zcml_configure`` to ``repoze.bfg.testing`` module API. This function populates a component registry from a ZCML file for testing purposes. --- repoze/bfg/zcml.py | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) (limited to 'repoze/bfg/zcml.py') diff --git a/repoze/bfg/zcml.py b/repoze/bfg/zcml.py index b0f5a2595..a4c18dda9 100644 --- a/repoze/bfg/zcml.py +++ b/repoze/bfg/zcml.py @@ -1,9 +1,6 @@ import re import sys -from zope.configuration import xmlconfig -import zope.configuration.config - from zope.component import getSiteManager from zope.component import getUtility from zope.component import queryUtility @@ -39,6 +36,7 @@ from repoze.bfg.authentication import RepozeWho1AuthenticationPolicy from repoze.bfg.authentication import RemoteUserAuthenticationPolicy from repoze.bfg.authentication import AuthTktAuthenticationPolicy from repoze.bfg.authorization import ACLAuthorizationPolicy +from repoze.bfg.configuration import zcml_configure from repoze.bfg.path import package_name from repoze.bfg.request import create_route_request_factory from repoze.bfg.resource import PackageOverrides @@ -730,13 +728,5 @@ class Uncacheable(object): """ Include in discriminators of actions which are not cacheable; this class only exists for backwards compatibility (<0.8.1)""" -def zcml_configure(name, package): - context = zope.configuration.config.ConfigurationMachine() - xmlconfig.registerCommonDirectives(context) - context.package = package - xmlconfig.include(context, name, package) - context.execute_actions(clear=False) - return context.actions - file_configure = zcml_configure # backwards compat (>0.8.1) -- cgit v1.2.3