diff options
| author | Tres Seaver <tseaver@palladion.com> | 2009-06-19 22:25:59 +0000 |
|---|---|---|
| committer | Tres Seaver <tseaver@palladion.com> | 2009-06-19 22:25:59 +0000 |
| commit | 948cc8a14d334ce696e58530b006e39d4dcfa9b4 (patch) | |
| tree | 3e427172fcce7f03ca3be265098662ee87c58d26 /repoze/bfg/tests/test_integration.py | |
| parent | 643bd0903f3fa64307f22f5173fefbe0871603fc (diff) | |
| download | pyramid-948cc8a14d334ce696e58530b006e39d4dcfa9b4.tar.gz pyramid-948cc8a14d334ce696e58530b006e39d4dcfa9b4.tar.bz2 pyramid-948cc8a14d334ce696e58530b006e39d4dcfa9b4.zip | |
Move pushpage support out into separate distribution.
Diffstat (limited to 'repoze/bfg/tests/test_integration.py')
| -rw-r--r-- | repoze/bfg/tests/test_integration.py | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/repoze/bfg/tests/test_integration.py b/repoze/bfg/tests/test_integration.py index 107c8ae89..941d47841 100644 --- a/repoze/bfg/tests/test_integration.py +++ b/repoze/bfg/tests/test_integration.py @@ -1,7 +1,6 @@ import os import unittest -from repoze.bfg.push import pushpage from repoze.bfg.wsgi import wsgiapp from repoze.bfg.view import bfg_view from repoze.bfg.view import static @@ -53,46 +52,6 @@ class WGSIAppPlusBFGViewTests(unittest.TestCase): ('registerAdapter', wsgiapptest, (INothing, IRequest), IView, '', None)) -@bfg_view(for_=INothing) -@pushpage('fake.pt') -def pushtest(context, request): - """ """ - return {'a':1} - -class PushPagePlusBFGViewTests(unittest.TestCase): - def setUp(self): - cleanUp() - - def tearDown(self): - cleanUp() - - def test_it(self): - import types - import os - from repoze.bfg.testing import registerDummyRenderer - path = os.path.join(os.path.dirname(__file__), 'fake.pt') - renderer = registerDummyRenderer(path) - self.assertEqual(pushtest.__is_bfg_view__, True) - self.failUnless(type(pushtest) is types.FunctionType) - context = DummyContext() - request = DummyRequest() - result = pushtest(context, request) - self.assertEqual(result.status, '200 OK') - - def test_scanned(self): - from repoze.bfg.interfaces import IView - from repoze.bfg.zcml import scan - context = DummyContext() - from repoze.bfg.tests import test_integration - scan(context, test_integration) - actions = context.actions - self.assertEqual(len(actions), 2) - action = actions[0] - IRequest = _getRequestInterface() - self.assertEqual(action['args'], - ('registerAdapter', - pushtest, (INothing, IRequest), IView, '', None)) - here = os.path.dirname(__file__) staticapp = static(os.path.join(here, 'fixtures')) |
