def test_advisory_cvrf_with_ips_sig_succeeds(self): adv_map = {IPS_SIG: ''} for k, v in advisory.ADVISORIES_COMMONS_MAP.items(): adv_map[k] = NA self.assertTrue(advisory.CVRF(**adv_map))
"Cisco-SA-20111107-CVE-2011-0941_cvrf.xml"), 'bug_ids': "BUGISidf", 'cvss_base_score': "7.0", 'advisory_title': "{}".format(mock_advisory_title), 'publication_url': "https://tools.cisco.com/mockurl", 'cwe': NA, 'product_names': ["product_name_1", "product_name_2"], 'summary': "This is summary" } mock_advisory = advisory.CVRF(**adv_cfg) mock_advisories = [mock_advisory] class MockLogger(object): def debug(self, *args, **kwargs): pass class AdvisoryTest(unittest.TestCase): def test_advisory_unchanged_na(self): self.assertEquals(advisory.NA, NA) def test_advisory_ips_sig_map_key_unchanged(self): self.assertTrue(IPS_SIG in advisory.IPS_SIG_MAP)