From 15a3c6f561563eb53ff1cc3637fc6afa75da9e89 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Fri, 20 Nov 2009 05:38:38 +0000 Subject: Passable stab at supporting an imperative mode. ZCML directives which accept paths now register absolute paths, while imperative registrations now register resource specifications. --- repoze/bfg/tests/test_zcml.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'repoze/bfg/tests/test_zcml.py') diff --git a/repoze/bfg/tests/test_zcml.py b/repoze/bfg/tests/test_zcml.py index 608c69f51..4623ea3b1 100644 --- a/repoze/bfg/tests/test_zcml.py +++ b/repoze/bfg/tests/test_zcml.py @@ -499,7 +499,7 @@ class TestStaticDirective(unittest.TestCase): discriminator = route_action['discriminator'] self.assertEqual(discriminator, ('route', 'name', False, None, None, None, None, None)) - route_action['callable']() + route_action['callable'](*route_action['args']) mapper = sm.getUtility(IRoutesMapper) routes = mapper.get_routes() self.assertEqual(len(routes), 1) @@ -649,6 +649,9 @@ class DummyContext: 'args':args} ) + def path(self, path): + return path + def resolve(self, dottedname): return self.resolved -- cgit v1.2.3