Skip to content

Commit 51447c7

Browse files
committed
all unittests clear for broken endpoint in Acunetix parser
1 parent 12ea082 commit 51447c7

2 files changed

Lines changed: 7 additions & 7 deletions

File tree

unittests/scans/acunetix/many_findings_with_port_number.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<Scan>
44
<Name><![CDATA[scan_name]]></Name>
55
<ShortName><![CDATA[scan_short_name]]></ShortName>
6-
<StartURL><![CDATA[www.itsecgames.com:8080:8080]]></StartURL>
6+
<StartURL><![CDATA[www.itsecgames.com:8080]]></StartURL>
77
<StartTime><![CDATA[27/02/2020, 12:56:09]]></StartTime>
88
<FinishTime><![CDATA[27/02/2020, 14:52:19]]></FinishTime>
99
<ScanTime><![CDATA[116 minutes, 5 seconds]]></ScanTime>

unittests/tools/test_acunetix_parser_port_num.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ def test_parse_file_with_multiple_finding(self):
5959
self.assertEqual(1, len(finding.unsaved_endpoints))
6060
endpoint = finding.unsaved_endpoints[0]
6161
self.assertIsNone(endpoint.protocol)
62-
self.assertIsNone(endpoint.port)
62+
self.assertEqual(endpoint.port,8080)
6363
self.assertEqual("www.itsecgames.com", endpoint.host)
6464
self.assertIsNone(endpoint.path)
6565
# check req/resp
@@ -89,7 +89,7 @@ def test_parse_file_with_multiple_finding(self):
8989
self.assertEqual(1, len(finding.unsaved_endpoints))
9090
endpoint = finding.unsaved_endpoints[0]
9191
self.assertIsNone(endpoint.protocol)
92-
self.assertIsNone(endpoint.port)
92+
self.assertEqual(endpoint.port,8080)
9393
self.assertEqual("www.itsecgames.com", endpoint.host)
9494
self.assertIsNone(endpoint.path)
9595
# check req/resp
@@ -118,7 +118,7 @@ def test_parse_file_with_multiple_finding(self):
118118
self.assertEqual(1, len(finding.unsaved_endpoints))
119119
endpoint = finding.unsaved_endpoints[0]
120120
self.assertIsNone(endpoint.protocol)
121-
self.assertIsNone(endpoint.port)
121+
self.assertEqual(endpoint.port,8080)
122122
self.assertEqual("www.itsecgames.com", endpoint.host)
123123
self.assertIsNone(endpoint.path)
124124
# check req/resp
@@ -157,12 +157,12 @@ def test_parse_file_with_example_com(self):
157157
self.assertEqual(3, len(finding.unsaved_endpoints))
158158
endpoint = finding.unsaved_endpoints[0]
159159
self.assertIsNone(endpoint.protocol)
160-
self.assertIsNone(endpoint.port)
160+
self.assertEqual(endpoint.port,9000)
161161
self.assertEqual("example.co.id", endpoint.host)
162162
self.assertEqual("h/search", endpoint.path)
163163
endpoint = finding.unsaved_endpoints[1]
164164
self.assertIsNone(endpoint.protocol)
165-
self.assertIsNone(endpoint.port)
165+
self.assertEqual(endpoint.port,9000)
166166
self.assertEqual("example.co.id", endpoint.host)
167167
self.assertEqual("m/zmain", endpoint.path)
168168
# check req/resp
@@ -190,7 +190,7 @@ def test_parse_file_with_example_com(self):
190190
self.assertEqual(1, len(finding.unsaved_endpoints))
191191
endpoint = finding.unsaved_endpoints[0]
192192
self.assertIsNone(endpoint.protocol)
193-
self.assertIsNone(endpoint.port)
193+
self.assertEqual(endpoint.port,9000)
194194
self.assertEqual("example.co.id", endpoint.host)
195195
self.assertIsNone(endpoint.path)
196196
# check req/resp

0 commit comments

Comments
 (0)