diff options
author | Andrey Zelenkov <zelenkov@nginx.com> | 2018-12-24 20:35:18 +0300 |
---|---|---|
committer | Andrey Zelenkov <zelenkov@nginx.com> | 2018-12-24 20:35:18 +0300 |
commit | f9a3328a2510e7237b8bd8f35a57914f6a22bbd2 (patch) | |
tree | 4d1d9dcd60dcf7ed0ca9f5ce3d29fd91ae007998 /test/test_php_application.py | |
parent | fac0ef29d564dbd8f59c6c8aaa89f0d656f1f786 (diff) | |
download | unit-f9a3328a2510e7237b8bd8f35a57914f6a22bbd2.tar.gz unit-f9a3328a2510e7237b8bd8f35a57914f6a22bbd2.tar.bz2 |
Tests: more QUERY_STRING tests.
Diffstat (limited to '')
-rw-r--r-- | test/test_php_application.py | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/test/test_php_application.py b/test/test_php_application.py index e0058d9a..ba9c03b3 100644 --- a/test/test_php_application.py +++ b/test/test_php_application.py @@ -48,6 +48,33 @@ class TestUnitPHPApplication(unit.TestUnitApplicationPHP): }, 'headers') self.assertEqual(resp['body'], body, 'body') + def test_php_application_query_string(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') + + def test_php_application_query_string_empty(self): + self.load('query_string') + + resp = self.get(url='/?') + + self.assertEqual(resp['status'], 200, 'query string empty status') + self.assertEqual(resp['headers']['Query-String'], '', + 'query string empty') + + @unittest.expectedFailure + def test_php_application_query_string_absent(self): + self.load('query_string') + + resp = self.get() + + self.assertEqual(resp['status'], 200, 'query string absent status') + self.assertEqual(resp['headers']['Query-String'], '', + 'query string absent') + def test_php_application_phpinfo(self): self.load('phpinfo') |