Example #1
0
 def test_ptp_highest_ranking_info_vuln(self):
     my_ptp = PTP()
     my_ptp.vulns = [{
         'ranking': constants.UNKNOWN
     }, {
         'ranking': constants.INFO
     }]
     self.assertTrue(my_ptp.highest_ranking == constants.INFO)
Example #2
0
 def test_ptp_get_highest_ranking_low_vuln(self):
     my_ptp = PTP()
     my_ptp.vulns = [{
         'ranking': constants.UNKNOWN
     }, {
         'ranking': constants.INFO
     }, {
         'ranking': constants.LOW
     }]
     self.assertTrue(my_ptp.get_highest_ranking() == constants.LOW)
Example #3
0
 def test_ptp_highest_ranking_medium_vuln(self):
     my_ptp = PTP()
     my_ptp.vulns = [{
         'ranking': constants.UNKNOWN
     }, {
         'ranking': constants.INFO
     }, {
         'ranking': constants.LOW
     }, {
         'ranking': constants.MEDIUM
     }]
     self.assertTrue(my_ptp.highest_ranking == constants.MEDIUM)
Example #4
0
File: test_ptp.py Project: owtf/ptp
 def test_ptp_get_highest_ranking_info_vuln(self):
     my_ptp = PTP()
     my_ptp.vulns = [{'ranking': constants.UNKNOWN}, {'ranking': constants.INFO}]
     self.assertTrue(my_ptp.get_highest_ranking() == constants.INFO)
Example #5
0
File: test_ptp.py Project: owtf/ptp
 def test_ptp_get_highest_ranking_unknown_vuln(self):
     my_ptp = PTP()
     my_ptp.vulns = [{'ranking': constants.UNKNOWN}]
     self.assertTrue(my_ptp.get_highest_ranking() == constants.UNKNOWN)
Example #6
0
File: test_ptp.py Project: owtf/ptp
 def test_ptp_get_highest_ranking_vuln_with_no_ranking(self):
     my_ptp = PTP()
     my_ptp.vulns = [{'foo': 'bar'}]
     self.assertTrue(my_ptp.get_highest_ranking() == constants.UNKNOWN)
Example #7
0
File: test_ptp.py Project: owtf/ptp
 def test_ptp_highest_ranking_high_vuln(self):
     my_ptp = PTP()
     my_ptp.vulns = [
         {'ranking': constants.UNKNOWN}, {'ranking': constants.INFO}, {'ranking': constants.LOW},
         {'ranking': constants.MEDIUM}, {'ranking': constants.HIGH}]
     self.assertTrue(my_ptp.highest_ranking == constants.HIGH)
Example #8
0
File: test_ptp.py Project: owtf/ptp
 def test_ptp_get_highest_ranking_medium_vuln(self):
     my_ptp = PTP()
     my_ptp.vulns = [
         {'ranking': constants.UNKNOWN}, {'ranking': constants.INFO}, {'ranking': constants.LOW},
         {'ranking': constants.MEDIUM}]
     self.assertTrue(my_ptp.get_highest_ranking() == constants.MEDIUM)
Example #9
0
 def test_ptp_get_highest_ranking_unknown_vuln(self):
     my_ptp = PTP()
     my_ptp.vulns = [{'ranking': constants.UNKNOWN}]
     self.assertTrue(my_ptp.get_highest_ranking() == constants.UNKNOWN)
Example #10
0
 def test_ptp_get_highest_ranking_vuln_with_no_ranking(self):
     my_ptp = PTP()
     my_ptp.vulns = [{'foo': 'bar'}]
     self.assertTrue(my_ptp.get_highest_ranking() == constants.UNKNOWN)