summaryrefslogtreecommitdiff
path: root/repoze/bfg/tests/test_zcml.py
diff options
context:
space:
mode:
authorChris McDonough <chrism@agendaless.com>2009-11-25 16:36:29 +0000
committerChris McDonough <chrism@agendaless.com>2009-11-25 16:36:29 +0000
commit2aa86c1a5227a675d32c4ede06e0c031ae3edfad (patch)
tree83423e9f192b41ac4c94b05ef8a37a23bf6df59c /repoze/bfg/tests/test_zcml.py
parent6f01c68cf897ad5116c00c949b6e9ef96de1d658 (diff)
downloadpyramid-2aa86c1a5227a675d32c4ede06e0c031ae3edfad.tar.gz
pyramid-2aa86c1a5227a675d32c4ede06e0c031ae3edfad.tar.bz2
pyramid-2aa86c1a5227a675d32c4ede06e0c031ae3edfad.zip
- Replace martian with something simpler.
Diffstat (limited to 'repoze/bfg/tests/test_zcml.py')
-rw-r--r--repoze/bfg/tests/test_zcml.py22
1 files changed, 10 insertions, 12 deletions
diff --git a/repoze/bfg/tests/test_zcml.py b/repoze/bfg/tests/test_zcml.py
index b9e70c0bd..34250bdde 100644
--- a/repoze/bfg/tests/test_zcml.py
+++ b/repoze/bfg/tests/test_zcml.py
@@ -601,23 +601,21 @@ class TestZCMLScanDirective(unittest.TestCase):
def tearDown(self):
testing.tearDown()
- def _callFUT(self, context, package, martian):
+ def _callFUT(self, context, package):
from repoze.bfg.zcml import scan
- return scan(context, package, martian)
+ return scan(context, package)
def test_it(self):
- from repoze.bfg.configuration import BFGMultiGrokker
- martian = DummyMartianModule()
- module_grokker = DummyModuleGrokker()
+ from repoze.bfg.configuration import Configurator
dummy_module = DummyModule()
context = DummyContext()
- self._callFUT(context, dummy_module, martian)
- context.actions[-1]['callable']()
- self.assertEqual(martian.name, 'dummy')
- multi_grokker = martian.module_grokker.multi_grokker
- self.assertEqual(multi_grokker.__class__, BFGMultiGrokker)
- self.assertEqual(martian.info, context.info)
- self.failUnless(martian.exclude_filter)
+ self._callFUT(context, dummy_module)
+ actions = context.actions
+ self.assertEqual(len(actions), 1)
+ action = actions[0]
+ self.assertEqual(action['callable'].im_func, Configurator.scan.im_func)
+ self.assertEqual(action['discriminator'], None)
+ self.assertEqual(action['args'], (dummy_module, None))
class DummyModule:
__path__ = "foo"