diff options
| author | Chris McDonough <chrism@agendaless.com> | 2009-01-15 03:34:10 +0000 |
|---|---|---|
| committer | Chris McDonough <chrism@agendaless.com> | 2009-01-15 03:34:10 +0000 |
| commit | d1c4f0339696de88ad43725f6457a8138db7aabf (patch) | |
| tree | 8407df659e3a0ae5878a38f7270f6e970ed756be /repoze/bfg/tests/test_zcml.py | |
| parent | 3e7be735f11f668c8d8044aeffba547a83650948 (diff) | |
| download | pyramid-d1c4f0339696de88ad43725f6457a8138db7aabf.tar.gz pyramid-d1c4f0339696de88ad43725f6457a8138db7aabf.tar.bz2 pyramid-d1c4f0339696de88ad43725f6457a8138db7aabf.zip | |
Clean up unused stuff.
Diffstat (limited to 'repoze/bfg/tests/test_zcml.py')
| -rw-r--r-- | repoze/bfg/tests/test_zcml.py | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/repoze/bfg/tests/test_zcml.py b/repoze/bfg/tests/test_zcml.py index f98bd8d8d..bed1708c0 100644 --- a/repoze/bfg/tests/test_zcml.py +++ b/repoze/bfg/tests/test_zcml.py @@ -23,8 +23,7 @@ class TestViewDirective(unittest.TestCase, PlacelessSetup): context = DummyContext() class IFoo: pass - def view(context, request): - pass + view = lambda *arg: None self._callFUT(context, 'repoze.view', IFoo, view=view) actions = context.actions from repoze.bfg.interfaces import IRequest @@ -63,8 +62,7 @@ class TestViewDirective(unittest.TestCase, PlacelessSetup): context = DummyContext() class IFoo: pass - def view(context, request): - pass + view = lambda *arg: None self._callFUT(context, 'repoze.view', IFoo, view=view, request_type=IDummy) actions = context.actions @@ -103,8 +101,7 @@ class TestViewDirective(unittest.TestCase, PlacelessSetup): context = DummyContext() class IFoo: pass - def view(context, request): - pass + view = lambda *arg: None self._callFUT(context, 'repoze.view', IFoo, view=view, request_type=IDummy, cacheable=False) actions = context.actions @@ -136,9 +133,6 @@ class TestViewDirective(unittest.TestCase, PlacelessSetup): class AView(object): zope.component.adapts(IFoo, IBar) - - def __call__(self, context, request): - pass aview = AView() @@ -331,7 +325,7 @@ class TestZCMLPickling(unittest.TestCase, PlacelessSetup): def test_file_configure_pickling_error(self): import os from repoze.bfg.zcml import file_configure - def dumpfail(actions, f): + def dumpfail(actions, f, num): raise IOError self.assertEqual(False, file_configure('configure.zcml', self.module, dumpfail)) @@ -468,12 +462,6 @@ class DummyContext: self.actions = [] self.info = None - def path(self, name): - import os - here = os.path.dirname(__file__) - fixtures = os.path.join(here, 'fixtures') - return os.path.join(fixtures, name) - def action(self, discriminator, callable, args): self.actions.append( {'discriminator':discriminator, |
