def test_scap(self): ct = get_feed_type_from_string('scap') self.assertEqual(ct, FeedType.SCAP)
def test_cert(self): ct = get_feed_type_from_string('cert') self.assertEqual(ct, FeedType.CERT)
def test_none_or_empty(self): ct = get_feed_type_from_string(None) self.assertIsNone(ct) ct = get_feed_type_from_string('') self.assertIsNone(ct)
def test_nvt(self): ct = get_feed_type_from_string('nvt') self.assertEqual(ct, FeedType.NVT)
def test_invalid(self): with self.assertRaises(InvalidArgument): get_feed_type_from_string('foo')