File tree Expand file tree Collapse file tree 5 files changed +9
-9
lines changed
main/python/opengrok_tools/utils Expand file tree Collapse file tree 5 files changed +9
-9
lines changed Original file line number Diff line number Diff line change 2
2
test =pytest
3
3
4
4
[tool:pytest]
5
- addopts = -v --color =yes --numprocesses =auto
5
+ addopts = -vv --color =yes --numprocesses =auto
6
6
testpaths = src/test/python
Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ def insert_file(input_xml, insert_xml_file):
37
37
"""
38
38
39
39
# This avoids resulting XML to have namespace prefixes in elements.
40
- ET .register_namespace ('' , "http ://xmlns.jcp.org /xml/ns/javaee " )
40
+ ET .register_namespace ('' , "https ://jakarta.ee /xml/ns/jakartaee " )
41
41
42
42
root = ET .fromstring (input_xml )
43
43
try :
Original file line number Diff line number Diff line change 1
1
<?xml version =' 1.0' encoding =' utf8' ?>
2
- <web-app xmlns =" http ://xmlns.jcp.org /xml/ns/javaee " xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance" version = " 3.1 " xsi : schemaLocation =" http ://xmlns.jcp.org /xml/ns/javaee http ://xmlns.jcp.org /xml/ns/javaee /web-app_3_1 .xsd" >
2
+ <web-app xmlns =" https ://jakarta.ee /xml/ns/jakartaee " xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance" xsi : schemaLocation =" https ://jakarta.ee /xml/ns/jakartaee https ://jakarta.ee /xml/ns/jakartaee /web-app_5_0 .xsd" version = " 5.0 " >
3
3
4
4
<display-name >OpenGrok</display-name >
5
5
<description >A wicked fast source browser</description >
42
42
<auth-method >BASIC</auth-method >
43
43
</login-config >
44
44
45
- </web-app >
45
+ </web-app >
Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ def test_xml_insert():
40
40
os .path .join (DIR_PATH , "insert.xml" ))
41
41
with open (os .path .join (DIR_PATH , "new.xml" )) as expected_xml :
42
42
# TODO: this should really be comparing XML trees
43
- assert out == expected_xml .read ()
43
+ assert out . strip () == expected_xml .read (). strip ()
44
44
45
45
46
46
def test_invalid_xml ():
Original file line number Diff line number Diff line change 1
1
<?xml version =" 1.0" encoding =" UTF-8" ?>
2
- <web-app xmlns =" http ://xmlns.jcp.org /xml/ns/javaee "
2
+ <web-app xmlns =" https ://jakarta.ee /xml/ns/jakartaee "
3
3
xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
4
- version = " 3.1 "
5
- xsi : schemaLocation = " http://xmlns.jcp.org /xml/ns/javaee
6
- http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd " >
4
+ xsi : schemaLocation = " https://jakarta.ee/xml/ns/jakartaee
5
+ https://jakarta.ee /xml/ns/jakartaee/web-app_5_0.xsd "
6
+ version = " 5.0 " >
7
7
8
8
<display-name >OpenGrok</display-name >
9
9
<description >A wicked fast source browser</description >
You can’t perform that action at this time.
0 commit comments