summaryrefslogtreecommitdiff
path: root/repoze/bfg/paster_templates
diff options
context:
space:
mode:
authorChris McDonough <chrism@agendaless.com>2009-05-05 01:18:43 +0000
committerChris McDonough <chrism@agendaless.com>2009-05-05 01:18:43 +0000
commitd322ac311ae5ac32351c45da391fd22c28f4dd2d (patch)
tree61a5621b0c0d9ff5397efe93b6da63695528b374 /repoze/bfg/paster_templates
parentf2515e840bf0967fc253d4378167a3c5d5a1cf2e (diff)
downloadpyramid-d322ac311ae5ac32351c45da391fd22c28f4dd2d.tar.gz
pyramid-d322ac311ae5ac32351c45da391fd22c28f4dd2d.tar.bz2
pyramid-d322ac311ae5ac32351c45da391fd22c28f4dd2d.zip
Get rid of direct dependency on zope.testing by creating our own addCleanUp and cleanUp functions in repoze.bfg.testing. Our dependencies still rely on zope.testing, however.
Diffstat (limited to 'repoze/bfg/paster_templates')
-rw-r--r--repoze/bfg/paster_templates/starter/+package+/tests.py_tmpl9
-rw-r--r--repoze/bfg/paster_templates/zodb/+package+/tests.py_tmpl9
2 files changed, 8 insertions, 10 deletions
diff --git a/repoze/bfg/paster_templates/starter/+package+/tests.py_tmpl b/repoze/bfg/paster_templates/starter/+package+/tests.py_tmpl
index 47524f344..c52ab2762 100644
--- a/repoze/bfg/paster_templates/starter/+package+/tests.py_tmpl
+++ b/repoze/bfg/paster_templates/starter/+package+/tests.py_tmpl
@@ -1,6 +1,5 @@
import unittest
-from zope.testing.cleanup import cleanUp
from repoze.bfg import testing
class ViewTests(unittest.TestCase):
@@ -14,13 +13,13 @@ class ViewTests(unittest.TestCase):
""" cleanUp() is required to clear out the application registry
between tests (done in setUp for good measure too)
"""
- cleanUp()
+ testing.cleanUp()
def tearDown(self):
""" cleanUp() is required to clear out the application registry
between tests
"""
- cleanUp()
+ testing.cleanUp()
def test_my_view(self):
from {{package}}.views import my_view
@@ -48,7 +47,7 @@ class ViewIntegrationTests(unittest.TestCase):
registrations your application declares in its configure.zcml
(including dependent registrations for repoze.bfg itself).
"""
- cleanUp()
+ testing.cleanUp()
import {{package}}
import zope.configuration.xmlconfig
zope.configuration.xmlconfig.file('configure.zcml',
@@ -56,7 +55,7 @@ class ViewIntegrationTests(unittest.TestCase):
def tearDown(self):
""" Clear out the application registry """
- cleanUp()
+ testing.cleanUp()
def test_my_view(self):
from {{package}}.views import my_view
diff --git a/repoze/bfg/paster_templates/zodb/+package+/tests.py_tmpl b/repoze/bfg/paster_templates/zodb/+package+/tests.py_tmpl
index 47524f344..c52ab2762 100644
--- a/repoze/bfg/paster_templates/zodb/+package+/tests.py_tmpl
+++ b/repoze/bfg/paster_templates/zodb/+package+/tests.py_tmpl
@@ -1,6 +1,5 @@
import unittest
-from zope.testing.cleanup import cleanUp
from repoze.bfg import testing
class ViewTests(unittest.TestCase):
@@ -14,13 +13,13 @@ class ViewTests(unittest.TestCase):
""" cleanUp() is required to clear out the application registry
between tests (done in setUp for good measure too)
"""
- cleanUp()
+ testing.cleanUp()
def tearDown(self):
""" cleanUp() is required to clear out the application registry
between tests
"""
- cleanUp()
+ testing.cleanUp()
def test_my_view(self):
from {{package}}.views import my_view
@@ -48,7 +47,7 @@ class ViewIntegrationTests(unittest.TestCase):
registrations your application declares in its configure.zcml
(including dependent registrations for repoze.bfg itself).
"""
- cleanUp()
+ testing.cleanUp()
import {{package}}
import zope.configuration.xmlconfig
zope.configuration.xmlconfig.file('configure.zcml',
@@ -56,7 +55,7 @@ class ViewIntegrationTests(unittest.TestCase):
def tearDown(self):
""" Clear out the application registry """
- cleanUp()
+ testing.cleanUp()
def test_my_view(self):
from {{package}}.views import my_view