diff options
| author | Malthe Borch <mborch@gmail.com> | 2008-12-05 15:32:20 +0000 |
|---|---|---|
| committer | Malthe Borch <mborch@gmail.com> | 2008-12-05 15:32:20 +0000 |
| commit | d47209b3efba980f7971bb0b7b3a130dd1bb933f (patch) | |
| tree | aa992a06f83f9c183aa8959cbb3e4a17005ea394 | |
| parent | 8dad2136bb02f460c0cb734c2e17d3a27c737a94 (diff) | |
| download | pyramid-d47209b3efba980f7971bb0b7b3a130dd1bb933f.tar.gz pyramid-d47209b3efba980f7971bb0b7b3a130dd1bb933f.tar.bz2 pyramid-d47209b3efba980f7971bb0b7b3a130dd1bb933f.zip | |
The adaptation annotation scheme does not work with old-style classes.
| -rw-r--r-- | repoze/bfg/tests/test_zcml.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/repoze/bfg/tests/test_zcml.py b/repoze/bfg/tests/test_zcml.py index b43083967..52a647dde 100644 --- a/repoze/bfg/tests/test_zcml.py +++ b/repoze/bfg/tests/test_zcml.py @@ -148,8 +148,9 @@ class TestViewDirective(unittest.TestCase, PlacelessSetup): class IBar(Interface): pass - class AView: + class AView(object): zope.component.adapts(IFoo, IBar) + def __call__(self, context, request): pass @@ -166,6 +167,7 @@ class TestViewDirective(unittest.TestCase, PlacelessSetup): regadapt = actions[0] regadapt_discriminator = ('view', IFoo, '', IBar, IView, True) + self.assertEqual(regadapt['discriminator'], regadapt_discriminator) self.assertEqual(regadapt['callable'], handler) self.assertEqual(regadapt['args'][0], 'registerAdapter') |
