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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)