summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Merickel <michael@merickel.org>2016-04-06 21:22:36 -0500
committerMichael Merickel <michael@merickel.org>2016-04-06 21:22:36 -0500
commitecc9d82ef6bd50a08dcbee7286ba4581d3caa902 (patch)
tree042ba24105b15f883fdaaef9ce36700b75db5877
parent5238bb64abfebc085ca95df517535f61e27b7fc2 (diff)
downloadpyramid-ecc9d82ef6bd50a08dcbee7286ba4581d3caa902.tar.gz
pyramid-ecc9d82ef6bd50a08dcbee7286ba4581d3caa902.tar.bz2
pyramid-ecc9d82ef6bd50a08dcbee7286ba4581d3caa902.zip
rename pyramid.config.derivations to pyramid.viewderivers
-rw-r--r--pyramid/config/views.py8
-rw-r--r--pyramid/tests/test_viewderivers.py (renamed from pyramid/tests/test_config/test_derivations.py)12
-rw-r--r--pyramid/viewderivers.py (renamed from pyramid/config/derivations.py)0
3 files changed, 10 insertions, 10 deletions
diff --git a/pyramid/config/views.py b/pyramid/config/views.py
index 1516743ad..2a019726f 100644
--- a/pyramid/config/views.py
+++ b/pyramid/config/views.py
@@ -76,9 +76,9 @@ from pyramid.util import (
)
import pyramid.config.predicates
-import pyramid.config.derivations
+import pyramid.viewderivers
-from pyramid.config.derivations import (
+from pyramid.viewderivers import (
preserve_view_attrs,
view_description,
requestonly,
@@ -1028,7 +1028,7 @@ class ViewsConfiguratorMixin(object):
raise ConfigurationError('Unknown view options: %s' % (kw,))
def _apply_view_derivers(self, info):
- d = pyramid.config.derivations
+ d = pyramid.viewderivers
# These derivations have fixed order
outer_derivers = [('attr_wrapped_view', d.attr_wrapped_view),
('predicated_view', d.predicated_view)]
@@ -1146,7 +1146,7 @@ class ViewsConfiguratorMixin(object):
order=PHASE1_CONFIG) # must be registered before add_view
def add_default_view_derivers(self):
- d = pyramid.config.derivations
+ d = pyramid.viewderivers
derivers = [
('authdebug_view', d.authdebug_view),
('secured_view', d.secured_view),
diff --git a/pyramid/tests/test_config/test_derivations.py b/pyramid/tests/test_viewderivers.py
index d93b37f38..dfac827dc 100644
--- a/pyramid/tests/test_config/test_derivations.py
+++ b/pyramid/tests/test_viewderivers.py
@@ -46,7 +46,7 @@ class TestDeriveView(unittest.TestCase):
self.assertEqual(
e.args[0],
'Could not convert return value of the view callable function '
- 'pyramid.tests.test_config.test_derivations.view into a response '
+ 'pyramid.tests.test_viewderivers.view into a response '
'object. The value returned was None. You may have forgotten '
'to return a value from the view callable.'
)
@@ -64,7 +64,7 @@ class TestDeriveView(unittest.TestCase):
self.assertEqual(
e.args[0],
"Could not convert return value of the view callable function "
- "pyramid.tests.test_config.test_derivations.view into a response "
+ "pyramid.tests.test_viewderivers.view into a response "
"object. The value returned was {'a': 1}. You may have "
"forgotten to define a renderer in the view configuration."
)
@@ -84,7 +84,7 @@ class TestDeriveView(unittest.TestCase):
msg = e.args[0]
self.assertTrue(msg.startswith(
'Could not convert return value of the view callable object '
- '<pyramid.tests.test_config.test_derivations.'))
+ '<pyramid.tests.test_viewderivers.'))
self.assertTrue(msg.endswith(
'> into a response object. The value returned was None. You '
'may have forgotten to return a value from the view callable.'))
@@ -128,7 +128,7 @@ class TestDeriveView(unittest.TestCase):
e.args[0],
'Could not convert return value of the view callable '
'method __call__ of '
- 'class pyramid.tests.test_config.test_derivations.AView into a '
+ 'class pyramid.tests.test_viewderivers.AView into a '
'response object. The value returned was None. You may have '
'forgotten to return a value from the view callable.'
)
@@ -151,7 +151,7 @@ class TestDeriveView(unittest.TestCase):
e.args[0],
'Could not convert return value of the view callable '
'method theviewmethod of '
- 'class pyramid.tests.test_config.test_derivations.AView into a '
+ 'class pyramid.tests.test_viewderivers.AView into a '
'response object. The value returned was None. You may have '
'forgotten to return a value from the view callable.'
)
@@ -358,7 +358,7 @@ class TestDeriveView(unittest.TestCase):
self.assertFalse(result is view)
self.assertEqual(view.__module__, result.__module__)
self.assertEqual(view.__doc__, result.__doc__)
- self.assertTrue('test_derivations' in result.__name__)
+ self.assertTrue('test_viewderivers' in result.__name__)
self.assertFalse(hasattr(result, '__call_permissive__'))
self.assertEqual(result(None, None), response)
diff --git a/pyramid/config/derivations.py b/pyramid/viewderivers.py
index 99baf46f9..99baf46f9 100644
--- a/pyramid/config/derivations.py
+++ b/pyramid/viewderivers.py