diff options
| author | Chris McDonough <chrism@agendaless.com> | 2009-11-10 05:10:34 +0000 |
|---|---|---|
| committer | Chris McDonough <chrism@agendaless.com> | 2009-11-10 05:10:34 +0000 |
| commit | c634e0349051bcb4cebe9203613c4bb9c0d89acd (patch) | |
| tree | 239e8ab3be241e5a9e551c2e493fb33ca400ec30 /repoze/bfg/paster_templates/routesalchemy | |
| parent | c1bc021263d4ae2299851b809d5c4d0e48399f61 (diff) | |
| download | pyramid-c634e0349051bcb4cebe9203613c4bb9c0d89acd.tar.gz pyramid-c634e0349051bcb4cebe9203613c4bb9c0d89acd.tar.bz2 pyramid-c634e0349051bcb4cebe9203613c4bb9c0d89acd.zip | |
Add superflous (but hopefully viral) setUp and tearDown methods that call testing.setUp and testing.tearDown.
Diffstat (limited to 'repoze/bfg/paster_templates/routesalchemy')
| -rw-r--r-- | repoze/bfg/paster_templates/routesalchemy/+package+/tests.py_tmpl | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/repoze/bfg/paster_templates/routesalchemy/+package+/tests.py_tmpl b/repoze/bfg/paster_templates/routesalchemy/+package+/tests.py_tmpl index 92caa7b8a..5c1477189 100644 --- a/repoze/bfg/paster_templates/routesalchemy/+package+/tests.py_tmpl +++ b/repoze/bfg/paster_templates/routesalchemy/+package+/tests.py_tmpl @@ -8,14 +8,15 @@ def _initTestingDB(): class TestMyView(unittest.TestCase): def setUp(self): + testing.setUp() _initTestingDB() - - def _callFUT(self, request): - from {{package}}.views import my_view - return my_view(request) + + def tearDown(self): + testing.tearDown() def test_it(self): + from {{package}}.views import my_view request = testing.DummyRequest() - info = self._callFUT(request) + info = my_view(request) self.assertEqual(info['root'].name, 'root') self.assertEqual(info['project'], '{{package}}') |
