diff options
author | Sergey A. Osokin <osa@FreeBSD.org.ru> | 2022-12-14 01:43:24 +0000 |
---|---|---|
committer | Sergey A. Osokin <osa@FreeBSD.org.ru> | 2022-12-14 01:43:24 +0000 |
commit | c9c001ee16091c76773d3e9e655d777696dd755a (patch) | |
tree | fb4536933863895f454f0a8ec5fdcf310732328a /test | |
parent | 63cc4a31bdea2601c8adc08194759657f1476b16 (diff) | |
download | unit-c9c001ee16091c76773d3e9e655d777696dd755a.tar.gz unit-c9c001ee16091c76773d3e9e655d777696dd755a.tar.bz2 |
Java: upgrading third-party components.
Diffstat (limited to '')
-rw-r--r-- | test/test_java_application.py | 17 | ||||
-rw-r--r-- | test/unit/applications/lang/java.py | 2 |
2 files changed, 11 insertions, 8 deletions
diff --git a/test/test_java_application.py b/test/test_java_application.py index b4dbff59..b825d925 100644 --- a/test/test_java_application.py +++ b/test/test_java_application.py @@ -71,6 +71,11 @@ class TestJavaApplication(TestApplicationJava): def test_java_application_get_variables(self): self.load('get_params') + def check_header(header, expect): + values = header.split(' ')[:-1] + assert len(values) == len(expect) + assert set(values) == set(expect) + headers = self.get(url='/?var1=val1&var2=&var4=val4&var4=foo')[ 'headers' ] @@ -79,13 +84,11 @@ class TestJavaApplication(TestApplicationJava): assert headers['X-Var-2'] == 'true', 'GET variables 2' assert headers['X-Var-3'] == 'false', 'GET variables 3' - assert ( - headers['X-Param-Names'] == 'var4 var2 var1 ' - ), 'getParameterNames' - assert headers['X-Param-Values'] == 'val4 foo ', 'getParameterValues' - assert ( - headers['X-Param-Map'] == 'var2= var1=val1 var4=val4,foo ' - ), 'getParameterMap' + check_header(headers['X-Param-Names'], ['var4', 'var2', 'var1']) + check_header(headers['X-Param-Values'], ['val4', 'foo']) + check_header( + headers['X-Param-Map'], ['var2=', 'var1=val1', 'var4=val4,foo'] + ) def test_java_application_post_variables(self): self.load('post_params') diff --git a/test/unit/applications/lang/java.py b/test/unit/applications/lang/java.py index 50998978..c8936274 100644 --- a/test/unit/applications/lang/java.py +++ b/test/unit/applications/lang/java.py @@ -52,7 +52,7 @@ class TestApplicationJava(TestApplicationProto): os.makedirs(classes_path) classpath = ( - option.current_dir + '/build/tomcat-servlet-api-9.0.52.jar' + option.current_dir + '/build/tomcat-servlet-api-9.0.70.jar' ) ws_jars = glob.glob( |