summaryrefslogtreecommitdiffhomepage
path: root/test/test_python_application.py
diff options
context:
space:
mode:
authorKonstantin Pavlov <thresh@nginx.com>2019-09-19 19:04:16 +0300
committerKonstantin Pavlov <thresh@nginx.com>2019-09-19 19:04:16 +0300
commitdeb26fa47a9ab1b358938134a8ced8bbc4a083e1 (patch)
tree0bedf8829f003fa4c0101e3421b7184acc1c8343 /test/test_python_application.py
parentfcb1f851d0b5d1774a6cb876288ea29cfef58618 (diff)
parentdb777d1e7f607d1b0f01dfb73ad0bac12987202b (diff)
downloadunit-deb26fa47a9ab1b358938134a8ced8bbc4a083e1.tar.gz
unit-deb26fa47a9ab1b358938134a8ced8bbc4a083e1.tar.bz2
Merged with the default branch.
Diffstat (limited to 'test/test_python_application.py')
-rw-r--r--test/test_python_application.py33
1 files changed, 32 insertions, 1 deletions
diff --git a/test/test_python_application.py b/test/test_python_application.py
index 3484b25e..5b6e2089 100644
--- a/test/test_python_application.py
+++ b/test/test_python_application.py
@@ -4,7 +4,7 @@ from unit.applications.lang.python import TestApplicationPython
class TestPythonApplication(TestApplicationPython):
- prerequisites = ['python']
+ prerequisites = {'modules': ['python']}
def test_python_application_variables(self):
self.load('variables')
@@ -71,6 +71,37 @@ class TestPythonApplication(TestApplicationPython):
'Query-String header',
)
+ def test_python_application_query_string_space(self):
+ self.load('query_string')
+
+ resp = self.get(url='/ ?var1=val1&var2=val2')
+ self.assertEqual(
+ resp['headers']['Query-String'],
+ 'var1=val1&var2=val2',
+ 'Query-String space',
+ )
+
+ resp = self.get(url='/ %20?var1=val1&var2=val2')
+ self.assertEqual(
+ resp['headers']['Query-String'],
+ 'var1=val1&var2=val2',
+ 'Query-String space 2',
+ )
+
+ resp = self.get(url='/ %20 ?var1=val1&var2=val2')
+ self.assertEqual(
+ resp['headers']['Query-String'],
+ 'var1=val1&var2=val2',
+ 'Query-String space 3',
+ )
+
+ resp = self.get(url='/blah %20 blah? var1= val1 & var2=val2')
+ self.assertEqual(
+ resp['headers']['Query-String'],
+ ' var1= val1 & var2=val2',
+ 'Query-String space 4',
+ )
+
def test_python_application_query_string_empty(self):
self.load('query_string')