summaryrefslogtreecommitdiff
path: root/tests/test_util
diff options
context:
space:
mode:
authorcce <devnull@localhost>2005-12-26 00:29:07 +0000
committercce <devnull@localhost>2005-12-26 00:29:07 +0000
commit646644640ab199a2aa592611da427b5d79eada81 (patch)
treebfde15d239fd3436dc3f7d38205019cac3be70f4 /tests/test_util
parent843425bf2c3f36d7fae7ae34ffcadd7f4f9f6280 (diff)
downloadpaste-646644640ab199a2aa592611da427b5d79eada81.tar.gz
- adding environ wrapper to paste.util
(response_headers are next/soon)
Diffstat (limited to 'tests/test_util')
-rw-r--r--tests/test_util/test_util_wrapper.py20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/test_util/test_util_wrapper.py b/tests/test_util/test_util_wrapper.py
new file mode 100644
index 0000000..0fbb898
--- /dev/null
+++ b/tests/test_util/test_util_wrapper.py
@@ -0,0 +1,20 @@
+# (c) 2005 Ian Bicking, Clark C. Evans and contributors
+# This module is part of the Python Paste Project and is released under
+# the MIT License: http://www.opensource.org/licenses/mit-license.php
+# Some of this code was funded by http://prometheusresearch.com
+
+from paste.util.wrapper import wrap
+
+def test_environ():
+ d = wrap({'HTTP_VIA':'bing', 'wsgi.version': '1.0' })
+ assert 'bing' == d.GET_HTTP_VIA()
+ d.SET_HTTP_HOST('womble')
+ assert 'womble' == d.GET_HTTP_HOST()
+ assert 'womble' == d.HTTP_HOST
+ d.HTTP_HOST = 'different'
+ assert 'different' == d['HTTP_HOST']
+ assert None == d.GET_REMOTE_USER()
+ assert None == d.REMOTE_USER
+ assert '1.0' == d.version
+ assert None == d.multiprocess
+