summaryrefslogtreecommitdiff
path: root/tests/test_request.py
diff options
context:
space:
mode:
authorianb <devnull@localhost>2007-05-25 02:43:35 +0000
committerianb <devnull@localhost>2007-05-25 02:43:35 +0000
commitaf3dff0a8d39285b04ec2ce54b6f9e971682152d (patch)
treef45f8cff2c1e935ddc2e822cf1b8bc5fe67806b9 /tests/test_request.py
parentc105d8bfcc0e9762663b4a4d22a66deea2f82ac8 (diff)
downloadpaste-af3dff0a8d39285b04ec2ce54b6f9e971682152d.tar.gz
Fix for request.languages, which didn't pass the right value to httpheaders. Filter out empty languages from httpheaders.ACCEPT_LANGUAGE.
Diffstat (limited to 'tests/test_request.py')
-rw-r--r--tests/test_request.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/tests/test_request.py b/tests/test_request.py
index d873401..7b400da 100644
--- a/tests/test_request.py
+++ b/tests/test_request.py
@@ -11,10 +11,11 @@ def simpleapp(environ, start_response):
response_headers = [('Content-type','text/plain')]
start_response(status, response_headers)
request = WSGIRequest(environ)
- return ['Hello world!\n', 'The get is %s' % str(request.GET),
- ' and Val is %s' % request.GET.get('name'),
- 'The languages are: %s' % request.languages,
- 'The accepttypes is: %s' % request.match_accept(['text/html', 'application/xml'])]
+ return [
+ 'Hello world!\n', 'The get is %s' % str(request.GET),
+ ' and Val is %s\n' % request.GET.get('name'),
+ 'The languages are: %s\n' % request.languages,
+ 'The accepttypes is: %s\n' % request.match_accept(['text/html', 'application/xml'])]
def test_gets():
app = TestApp(simpleapp)