From 9966517cfaada7b7dc885f69feffc8f955beb801 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Thu, 19 Nov 2009 11:48:59 +0000 Subject: Test make_wsgi_app. --- repoze/bfg/configuration.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'repoze/bfg/configuration.py') diff --git a/repoze/bfg/configuration.py b/repoze/bfg/configuration.py index 0c64d7411..6d8904cfc 100644 --- a/repoze/bfg/configuration.py +++ b/repoze/bfg/configuration.py @@ -68,9 +68,8 @@ class Configurator(object): """ A wrapper around the registry that performs configuration tasks """ def __init__(self, registry=None): if registry is None: - self.make_default_registry() - else: - self.reg = registry + registry = self.make_default_registry() + self.reg = registry def make_default_registry(self): self.reg = Registry() @@ -95,9 +94,7 @@ class Configurator(object): # we send. manager.push({'registry':self.reg, 'request':None}) try: - # use dispatch here instead of registry.notify to make unit - # tests possible - dispatch(WSGIApplicationCreatedEvent(app)) + self.reg.notify(WSGIApplicationCreatedEvent(app)) finally: manager.pop() return app -- cgit v1.2.3