summaryrefslogtreecommitdiff
path: root/repoze/bfg/tests
diff options
context:
space:
mode:
authorChris McDonough <chrism@agendaless.com>2009-11-18 00:37:21 +0000
committerChris McDonough <chrism@agendaless.com>2009-11-18 00:37:21 +0000
commit57267a39be342ace47cccfcb481dcc407a48b0d7 (patch)
tree2160f1a0d4f5614f410626b6a3a3b0c76a7547ac /repoze/bfg/tests
parent541e450d8098988209af3ecfd3829b242999039c (diff)
downloadpyramid-57267a39be342ace47cccfcb481dcc407a48b0d7.tar.gz
pyramid-57267a39be342ace47cccfcb481dcc407a48b0d7.tar.bz2
pyramid-57267a39be342ace47cccfcb481dcc407a48b0d7.zip
- The ``repoze.bfg.registry.make_registry`` callable has been removed.
- The ``repoze.bfg.view.map_view`` callable has been removed. - The ``repoze.bfg.view.owrap_view`` callable has been removed. - The ``repoze.bfg.view.predicate_wrap`` callable has been removed. - The ``repoze.bfg.view.secure_view`` callable has been removed. - The ``repoze.bfg.view.authdebug_view`` callable has been removed. - The ``repoze.bfg.view.renderer_from_name`` callable has been removed. - Coverage.
Diffstat (limited to 'repoze/bfg/tests')
-rw-r--r--repoze/bfg/tests/test_configuration.py22
-rw-r--r--repoze/bfg/tests/test_registry.py29
-rw-r--r--repoze/bfg/tests/test_urldispatch.py7
-rw-r--r--repoze/bfg/tests/test_zcml.py68
4 files changed, 34 insertions, 92 deletions
diff --git a/repoze/bfg/tests/test_configuration.py b/repoze/bfg/tests/test_configuration.py
index d7f707f87..5449e0933 100644
--- a/repoze/bfg/tests/test_configuration.py
+++ b/repoze/bfg/tests/test_configuration.py
@@ -2,20 +2,6 @@ import unittest
from repoze.bfg.testing import cleanUp
-class MakeRegistryTests(unittest.TestCase):
- def setUp(self):
- cleanUp()
-
- def tearDown(self):
- cleanUp()
-
- def _makeOne(self):
- from repoze.bfg.registry import Registry
- from repoze.bfg.configuration import Configurator
- reg = Registry()
- config = Configurator(reg)
-
-
class ConfiguratorTests(unittest.TestCase):
def _makeOne(self, registry=None):
from repoze.bfg.registry import Registry
@@ -619,14 +605,6 @@ class DummyRootFactory:
def __init__(self, root):
self.root = root
-class DummyLogger:
- def __init__(self):
- self.messages = []
- def info(self, msg):
- self.messages.append(msg)
- warn = info
- debug = info
-
class DummyContext:
pass
diff --git a/repoze/bfg/tests/test_registry.py b/repoze/bfg/tests/test_registry.py
index b652d2155..a88e0cb67 100644
--- a/repoze/bfg/tests/test_registry.py
+++ b/repoze/bfg/tests/test_registry.py
@@ -1,5 +1,4 @@
import unittest
-from repoze.bfg.testing import cleanUp
class TestRegistry(unittest.TestCase):
def _getTargetClass(self):
@@ -44,31 +43,3 @@ class DummyModule:
__file__ = ''
-class DummyContext:
- def __init__(self, resolved=DummyModule):
- self.actions = []
- self.info = None
- self.resolved = resolved
-
-class DummyRequest:
- def __init__(self, environ=None):
- if environ is None:
- environ = {}
- self.environ = environ
-
- def get_response(self, application):
- return application
-
- def copy(self):
- self.copied = True
- return self
-
-class DummyResponse:
- status = '200 OK'
- headerlist = ()
- def __init__(self, body=None):
- if body is None:
- self.app_iter = ()
- else:
- self.app_iter = [body]
-
diff --git a/repoze/bfg/tests/test_urldispatch.py b/repoze/bfg/tests/test_urldispatch.py
index 18ebe3e98..7ed686915 100644
--- a/repoze/bfg/tests/test_urldispatch.py
+++ b/repoze/bfg/tests/test_urldispatch.py
@@ -231,13 +231,6 @@ class TestCompileRouteMatchFunctional(unittest.TestCase):
'/a/La%20Pe%C3%B1a')
self.generates('/foo/:id.html', {'id':'bar'}, '/foo/bar.html')
-class DummyRootFactory(object):
- def __init__(self, result):
- self.result = result
- def __call__(self, request):
- self.request = request
- return self.result
-
class DummyContext(object):
""" """
diff --git a/repoze/bfg/tests/test_zcml.py b/repoze/bfg/tests/test_zcml.py
index af2b64de6..7caf2a596 100644
--- a/repoze/bfg/tests/test_zcml.py
+++ b/repoze/bfg/tests/test_zcml.py
@@ -4,14 +4,14 @@ logging.basicConfig()
import unittest
-from repoze.bfg.testing import cleanUp
+from repoze.bfg import testing
class TestViewDirective(unittest.TestCase):
def setUp(self):
- cleanUp()
+ testing.setUp()
def tearDown(self):
- cleanUp()
+ testing.tearDown()
def _callFUT(self, *arg, **kw):
from repoze.bfg.zcml import view
@@ -1237,11 +1237,11 @@ class TestViewDirective(unittest.TestCase):
class TestNotFoundDirective(unittest.TestCase):
def setUp(self):
- cleanUp()
+ testing.setUp()
def tearDown(self):
- cleanUp()
-
+ testing.tearDown()
+
def _callFUT(self, context, view):
from repoze.bfg.zcml import notfound
return notfound(context, view)
@@ -1268,11 +1268,11 @@ class TestNotFoundDirective(unittest.TestCase):
class TestForbiddenDirective(unittest.TestCase):
def setUp(self):
- cleanUp()
+ testing.setUp()
def tearDown(self):
- cleanUp()
-
+ testing.tearDown()
+
def _callFUT(self, context, view):
from repoze.bfg.zcml import forbidden
return forbidden(context, view)
@@ -1299,11 +1299,11 @@ class TestForbiddenDirective(unittest.TestCase):
class TestViewUtility(unittest.TestCase):
def setUp(self):
- cleanUp()
+ testing.setUp()
def tearDown(self):
- cleanUp()
-
+ testing.tearDown()
+
def _callFUT(self, context, view, attr, renderer, wrapper, iface):
from repoze.bfg.zcml import view_utility
return view_utility(context, view, attr, renderer, wrapper, iface)
@@ -1360,11 +1360,11 @@ class TestViewUtility(unittest.TestCase):
class TestRepozeWho1AuthenticationPolicyDirective(unittest.TestCase):
def setUp(self):
- cleanUp()
+ testing.setUp()
def tearDown(self):
- cleanUp()
-
+ testing.tearDown()
+
def _callFUT(self, context, **kw):
from repoze.bfg.zcml import repozewho1authenticationpolicy
return repozewho1authenticationpolicy(context, **kw)
@@ -1403,11 +1403,11 @@ class TestRepozeWho1AuthenticationPolicyDirective(unittest.TestCase):
class TestRemoteUserAuthenticationPolicyDirective(unittest.TestCase):
def setUp(self):
- cleanUp()
+ testing.setUp()
def tearDown(self):
- cleanUp()
-
+ testing.tearDown()
+
def _callFUT(self, context, **kw):
from repoze.bfg.zcml import remoteuserauthenticationpolicy
return remoteuserauthenticationpolicy(context, **kw)
@@ -1449,11 +1449,11 @@ class TestRemoteUserAuthenticationPolicyDirective(unittest.TestCase):
class TestAuthTktAuthenticationPolicyDirective(unittest.TestCase):
def setUp(self):
- cleanUp()
+ testing.setUp()
def tearDown(self):
- cleanUp()
-
+ testing.tearDown()
+
def _callFUT(self, context, secret, **kw):
from repoze.bfg.zcml import authtktauthenticationpolicy
return authtktauthenticationpolicy(context, secret, **kw)
@@ -1507,11 +1507,11 @@ class TestAuthTktAuthenticationPolicyDirective(unittest.TestCase):
class TestACLAuthorizationPolicyDirective(unittest.TestCase):
def setUp(self):
- cleanUp()
+ testing.setUp()
def tearDown(self):
- cleanUp()
-
+ testing.tearDown()
+
def _callFUT(self, context, **kw):
from repoze.bfg.zcml import aclauthorizationpolicy
return aclauthorizationpolicy(context, **kw)
@@ -1535,10 +1535,10 @@ class TestACLAuthorizationPolicyDirective(unittest.TestCase):
class TestRouteDirective(unittest.TestCase):
def setUp(self):
- cleanUp()
+ testing.setUp()
def tearDown(self):
- cleanUp()
+ testing.tearDown()
def _callFUT(self, *arg, **kw):
from repoze.bfg.zcml import route
@@ -2424,10 +2424,10 @@ class TestRouteDirective(unittest.TestCase):
class TestStaticDirective(unittest.TestCase):
def setUp(self):
- cleanUp()
+ testing.setUp()
def tearDown(self):
- cleanUp()
+ testing.tearDown()
def _callFUT(self, *arg, **kw):
from repoze.bfg.zcml import static
@@ -2553,10 +2553,10 @@ class TestStaticDirective(unittest.TestCase):
class TestResourceDirective(unittest.TestCase):
def setUp(self):
- cleanUp()
+ testing.setUp()
def tearDown(self):
- cleanUp()
+ testing.tearDown()
def _callFUT(self, *arg, **kw):
from repoze.bfg.zcml import resource
@@ -2656,7 +2656,7 @@ class TestZCMLConfigure(unittest.TestCase):
return zcml_configure(path, package)
def setUp(self):
- cleanUp()
+ testing.setUp()
self.tempdir = None
import sys
import os
@@ -2675,7 +2675,7 @@ class TestZCMLConfigure(unittest.TestCase):
self.tempdir = tempdir
def tearDown(self):
- cleanUp()
+ testing.tearDown()
import sys
import shutil
if self.module is not None:
@@ -2697,10 +2697,10 @@ class TestZCMLConfigure(unittest.TestCase):
class TestZCMLScanDirective(unittest.TestCase):
def setUp(self):
- cleanUp()
+ testing.setUp()
def tearDown(self):
- cleanUp()
+ testing.tearDown()
def _callFUT(self, context, package, martian):
from repoze.bfg.zcml import scan