예제 #1
0
 def test_result(self):
     ct = EntityType.from_string("result")
     self.assertEqual(ct, EntityType.RESULT)
예제 #2
0
 def test_nvt(self):
     ct = EntityType.from_string("nvt")
     self.assertEqual(ct, EntityType.NVT)
예제 #3
0
 def test_ovaldef(self):
     ct = EntityType.from_string("ovaldef")
     self.assertEqual(ct, EntityType.OVALDEF)
예제 #4
0
 def test_group(self):
     ct = EntityType.from_string("group")
     self.assertEqual(ct, EntityType.GROUP)
예제 #5
0
 def test_info(self):
     ct = EntityType.from_string("info")
     self.assertEqual(ct, EntityType.INFO)
예제 #6
0
 def test_cpe(self):
     ct = EntityType.from_string("cpe")
     self.assertEqual(ct, EntityType.CPE)
예제 #7
0
 def test_dfn_cert_adv(self):
     ct = EntityType.from_string("dfn_cert_adv")
     self.assertEqual(ct, EntityType.DFN_CERT_ADV)
예제 #8
0
 def test_task(self):
     ct = EntityType.from_string("task")
     self.assertEqual(ct, EntityType.TASK)
예제 #9
0
 def test_ticket(self):
     ct = EntityType.from_string("ticket")
     self.assertEqual(ct, EntityType.TICKET)
예제 #10
0
 def test_schedule(self):
     ct = EntityType.from_string("schedule")
     self.assertEqual(ct, EntityType.SCHEDULE)
예제 #11
0
 def test_target(self):
     ct = EntityType.from_string("target")
     self.assertEqual(ct, EntityType.TARGET)
예제 #12
0
 def test_scanner(self):
     ct = EntityType.from_string("scanner")
     self.assertEqual(ct, EntityType.SCANNER)
예제 #13
0
    def test_scan_config(self):
        ct = EntityType.from_string("config")
        self.assertEqual(ct, EntityType.SCAN_CONFIG)

        ct = EntityType.from_string("scan_config")
        self.assertEqual(ct, EntityType.SCAN_CONFIG)
예제 #14
0
 def test_role(self):
     ct = EntityType.from_string("role")
     self.assertEqual(ct, EntityType.ROLE)
예제 #15
0
 def test_audit(self):
     ct = EntityType.from_string("audit")
     self.assertEqual(ct, EntityType.AUDIT)
예제 #16
0
 def test_tls_certificate(self):
     ft = EntityType.from_string("tls_certificate")
     self.assertEqual(ft, EntityType.TLS_CERTIFICATE)
예제 #17
0
 def test_cert_bund_adv(self):
     ct = EntityType.from_string("cert_bund_adv")
     self.assertEqual(ct, EntityType.CERT_BUND_ADV)
예제 #18
0
 def test_user(self):
     ct = EntityType.from_string("user")
     self.assertEqual(ct, EntityType.USER)
예제 #19
0
 def test_credential(self):
     ct = EntityType.from_string("credential")
     self.assertEqual(ct, EntityType.CREDENTIAL)
예제 #20
0
    def test_vulnerability(self):
        ct = EntityType.from_string("vuln")
        self.assertEqual(ct, EntityType.VULNERABILITY)

        ct = EntityType.from_string("vulnerability")
        self.assertEqual(ct, EntityType.VULNERABILITY)
예제 #21
0
 def test_filter(self):
     ct = EntityType.from_string("filter")
     self.assertEqual(ct, EntityType.FILTER)
예제 #22
0
 def test_invalid(self):
     with self.assertRaises(InvalidArgument):
         EntityType.from_string("foo")
예제 #23
0
 def test_host(self):
     ct = EntityType.from_string("host")
     self.assertEqual(ct, EntityType.HOST)
예제 #24
0
 def test_none_or_empty(self):
     ct = EntityType.from_string(None)
     self.assertIsNone(ct)
     ct = EntityType.from_string("")
     self.assertIsNone(ct)
예제 #25
0
 def test_note(self):
     ct = EntityType.from_string("note")
     self.assertEqual(ct, EntityType.NOTE)
예제 #26
0
 def test_alert(self):
     ct = EntityType.from_string("alert")
     self.assertEqual(ct, EntityType.ALERT)
예제 #27
0
    def test_operating_system(self):
        ct = EntityType.from_string("os")
        self.assertEqual(ct, EntityType.OPERATING_SYSTEM)

        ct = EntityType.from_string("operating_system")
        self.assertEqual(ct, EntityType.OPERATING_SYSTEM)
예제 #28
0
 def test_asset(self):
     ct = EntityType.from_string("asset")
     self.assertEqual(ct, EntityType.ASSET)
예제 #29
0
 def test_override(self):
     ct = EntityType.from_string("override")
     self.assertEqual(ct, EntityType.OVERRIDE)
예제 #30
0
 def test_report_format(self):
     ct = EntityType.from_string("report_format")
     self.assertEqual(ct, EntityType.REPORT_FORMAT)