4
4
5
5
6
6
class TestSpotbugsParser (DojoTestCase ):
7
-
8
7
def test_no_findings (self ):
9
8
parser = SpotbugsParser ()
10
9
findings = parser .get_findings (get_unit_tests_path () + "/scans/spotbugs/no_finding.xml" , Test ())
@@ -76,19 +75,15 @@ def test_description(self):
76
75
test_finding = findings [0 ]
77
76
# Test if line 13 is correct
78
77
self .assertEqual (
79
- "At IdentityFunctionCommandInjection.kt:[lines 20-170]" ,
80
- test_finding .description .splitlines ()[12 ]
78
+ "At IdentityFunctionCommandInjection.kt:[lines 20-170]" , test_finding .description .splitlines ()[12 ]
81
79
)
82
80
83
81
def test_mitigation (self ):
84
82
parser = SpotbugsParser ()
85
83
findings = parser .get_findings (get_unit_tests_path () + "/scans/spotbugs/many_findings.xml" , Test ())
86
84
test_finding = findings [0 ]
87
- # Test if line 10 is correct
88
- self .assertEqual (
89
- "#### Example" ,
90
- test_finding .mitigation .splitlines ()[9 ]
91
- )
85
+ # Test if line 8 is correct
86
+ self .assertEqual ("#### Example" , test_finding .mitigation .splitlines ()[7 ])
92
87
93
88
def test_references (self ):
94
89
parser = SpotbugsParser ()
@@ -97,7 +92,7 @@ def test_references(self):
97
92
# Test if line 2 is correct
98
93
self .assertEqual (
99
94
"[OWASP: Top 10 2013-A1-Injection](https://www.owasp.org/index.php/Top_10_2013-A1-Injection)" ,
100
- test_finding .references .splitlines ()[1 ]
95
+ test_finding .references .splitlines ()[1 ],
101
96
)
102
97
103
98
def test_version_4_4 (self ):
0 commit comments