示例#1
0
 def test_not_only_cveinfo(self):
     args = generate_args(False, False, None, 'CVE-2002-1562', None, 12345,
                          None, None, None, None)
     status = VulnCLIParser.verify_args(args)
     self.assertEqual(status, 6)
示例#2
0
 def test_bad_cveinfo(self):
     args = generate_args(False, False, None, 'CVE-62', None, None, None,
                          None, None, None)
     status = VulnCLIParser.verify_args(args)
     self.assertEqual(status, 7)
 def test_ok(self):
     args = generate_args(False, False, None, None, None, 'openldap',
                          '2.2.20')
     status = VulnCLIParser.verify_args("dagda.py vuln", args)
     self.assertEqual(status, 0)
示例#4
0
 def test_bad_rhba_info(self):
     args = generate_args(False, False, None, None, None, None, None, None, None, None, None, 'RHBA--2012:002', None, None)
     status = VulnCLIParser.verify_args(args)
     self.assertEqual(status, 20)
 def test_not_only_bid(self):
     args = generate_args(False, False, None, 12345, 12345, None, None)
     status = VulnCLIParser.verify_args("dagda.py vuln", args)
     self.assertEqual(status, 6)
 def test_bad_exploit_db(self):
     args = generate_args(False, False, None, None, -12345, None, None)
     status = VulnCLIParser.verify_args("dagda.py vuln", args)
     self.assertEqual(status, 9)
示例#7
0
 def test_not_only_cveinfo(self):
     args = generate_args(False, False, None,'CVE-2002-1562', None, 12345, None, None, None, None, None, None, None, None)
     status = VulnCLIParser.verify_args(args)
     self.assertEqual(status, 6)
 def test_not_only_cve(self):
     args = generate_args(False, False, 'CVE-2002-1562', 12345, None, None,
                          None)
     status = VulnCLIParser.verify_args("dagda.py vuln", args)
     self.assertEqual(status, 4)
示例#9
0
 def test_empty_args(self):
     empty_args = generate_args(False, False, None, None, None, None, None, None, None, None, None, None, None, None)
     status = VulnCLIParser.verify_args(empty_args)
     self.assertEqual(status, 1)
示例#10
0
 def test_not_only_init_status(self):
     args = generate_args(False, True, None, None, 12345, None, None, None, None, None, None, None, None, None)
     status = VulnCLIParser.verify_args(args)
     self.assertEqual(status, 3)
示例#11
0
 def test_ok(self):
     args = generate_args(False, False, None, None, None, None, None, None, 'openldap', '2.2.20', None, None, None, None)
     status = VulnCLIParser.verify_args(args)
     self.assertEqual(status, 0)
示例#12
0
 def test_bad_rhsa_info(self):
     args = generate_args(False, False, None, None, None, None, None, None, None, None, None, None, None, 'RHSA-201222:002')
     status = VulnCLIParser.verify_args(args)
     self.assertEqual(status, 24)
示例#13
0
 def test_not_only_rhsa_info(self):
     args = generate_args(False, False, None, None, None, None, None, None, 'openldap', None, None, None, None, 'RHSA-2012:002')
     status = VulnCLIParser.verify_args(args)
     self.assertEqual(status, 23)
示例#14
0
 def test_not_only_bid_info(self):
     args = generate_args(False, False, None, None, None, 12345, 'openldap',
                          None, None, None)
     status = VulnCLIParser.verify_args(args)
     self.assertEqual(status, 10)
示例#15
0
 def test_bad_cveinfo(self):
     args = generate_args(False, False, None, 'CVE-62', None, None, None, None, None, None, None, None, None, None)
     status = VulnCLIParser.verify_args(args)
     self.assertEqual(status, 7)
示例#16
0
 def test_bad_bid_info(self):
     args = generate_args(False, False, None, None, None, -12345, None,
                          None, None, None)
     status = VulnCLIParser.verify_args(args)
     self.assertEqual(status, 11)
示例#17
0
 def test_not_only_bid(self):
     args = generate_args(False, False, None, None, 12345, None, 'openldap', None, None, None, None, None, None, None)
     status = VulnCLIParser.verify_args(args)
     self.assertEqual(status, 8)
示例#18
0
 def test_bad_cve(self):
     args = generate_args(False, False, 'CVE-62', None, None, None, None)
     status = VulnCLIParser.verify_args("dagda.py vuln", args)
     self.assertEqual(status, 5)
示例#19
0
 def test_bad_exploit_db(self):
     args = generate_args(False, False, None, None, None, None, -12345, None, None, None, None, None, None, None)
     status = VulnCLIParser.verify_args(args)
     self.assertEqual(status, 13)
示例#20
0
 def test_not_only_exploit_db(self):
     args = generate_args(False, False, None, None, 12345, 'openldap', None)
     status = VulnCLIParser.verify_args("dagda.py vuln", args)
     self.assertEqual(status, 8)
示例#21
0
 def test_not_only_exploit_db_info(self):
     args = generate_args(False, False, None, None, None, None, None, 12345, 'openldap', None, None, None, None, None)
     status = VulnCLIParser.verify_args(args)
     self.assertEqual(status, 14)
示例#22
0
 def test_only_product_version(self):
     args = generate_args(False, False, None, None, None, None, '2.30')
     status = VulnCLIParser.verify_args("dagda.py vuln", args)
     self.assertEqual(status, 10)
示例#23
0
 def test_not_only_init_status(self):
     args = generate_args(False, True, None, None, 12345, None, None, None,
                          None, None)
     status = VulnCLIParser.verify_args(args)
     self.assertEqual(status, 3)
示例#24
0
 def test_empty_args(self):
     empty_args = generate_args(False, False, None, None, None, None, None)
     status = VulnCLIParser.verify_args("dagda.py vuln", empty_args)
     self.assertEqual(status, 1)
示例#25
0
 def test_only_product_version(self):
     args = generate_args(False, False, None, None, None, None, None, None, None, '2.30', None, None, None, None)
     status = VulnCLIParser.verify_args(args)
     self.assertEqual(status, 16)