diff options
Diffstat (limited to 'test/test_python_application.py')
-rw-r--r-- | test/test_python_application.py | 33 |
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') |