summaryrefslogtreecommitdiff
path: root/tests/test_util
diff options
context:
space:
mode:
authorcce <devnull@localhost>2005-12-27 07:01:54 +0000
committercce <devnull@localhost>2005-12-27 07:01:54 +0000
commit5f6623a67f995758deffb9ddfdd71a7134b7c25f (patch)
tree12bd6d106ad97787a91d44f6a77b177b303cf02b /tests/test_util
parent38546e3dc13ecee90dcd6a8537b9227561749c99 (diff)
downloadpaste-5f6623a67f995758deffb9ddfdd71a7134b7c25f.tar.gz
- wrappers are not the way to go, will be doing some changes
to httpheaders to include some of this functionality
Diffstat (limited to 'tests/test_util')
-rw-r--r--tests/test_util/test_util_wrapper.py32
1 files changed, 0 insertions, 32 deletions
diff --git a/tests/test_util/test_util_wrapper.py b/tests/test_util/test_util_wrapper.py
deleted file mode 100644
index 63c52fa..0000000
--- a/tests/test_util/test_util_wrapper.py
+++ /dev/null
@@ -1,32 +0,0 @@
-# (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():
- environ = {'HTTP_VIA':'bing', 'wsgi.version': '1.0' }
- d = wrap(environ)
- 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' == environ['HTTP_HOST']
- assert None == d.GET_REMOTE_USER()
- assert None == d.REMOTE_USER
- assert '1.0' == d.version
- assert None == d.multiprocess
-
-def test_response_headers():
- response_headers = []
- d = wrap(response_headers)
- assert None == d.CONTENT_TYPE
- d.CONTENT_TYPE = 'text/plain'
- assert response_headers == [('content-type','text/plain')]
- assert d.CONTENT_TYPE == 'text/plain'
- d.CONTENT_TYPE = 'text/html'
- assert response_headers == [('content-type','text/html')]
- assert d.CONTENT_TYPE == 'text/html'
- assert None == getattr(d,'SET_COOKIE',None) # multi-entity header