Exemple #1
0
 def test_result(self):
     ct = get_entity_type_from_string('result')
     self.assertEqual(ct, EntityType.RESULT)
Exemple #2
0
 def test_note(self):
     ct = get_entity_type_from_string('note')
     self.assertEqual(ct, EntityType.NOTE)
Exemple #3
0
    def test_operating_system(self):
        ct = get_entity_type_from_string('os')
        self.assertEqual(ct, EntityType.OPERATING_SYSTEM)

        ct = get_entity_type_from_string('operating_system')
        self.assertEqual(ct, EntityType.OPERATING_SYSTEM)
Exemple #4
0
 def test_filter(self):
     ct = get_entity_type_from_string('filter')
     self.assertEqual(ct, EntityType.FILTER)
Exemple #5
0
 def test_host(self):
     ct = get_entity_type_from_string('host')
     self.assertEqual(ct, EntityType.HOST)
Exemple #6
0
 def test_cert_bund_adv(self):
     ct = get_entity_type_from_string('cert_bund_adv')
     self.assertEqual(ct, EntityType.CERT_BUND_ADV)
Exemple #7
0
 def test_credential(self):
     ct = get_entity_type_from_string('credential')
     self.assertEqual(ct, EntityType.CREDENTIAL)
Exemple #8
0
 def test_task(self):
     ct = get_entity_type_from_string('task')
     self.assertEqual(ct, EntityType.TASK)
Exemple #9
0
 def test_ticket(self):
     ct = get_entity_type_from_string('ticket')
     self.assertEqual(ct, EntityType.TICKET)
Exemple #10
0
 def test_schedule(self):
     ct = get_entity_type_from_string('schedule')
     self.assertEqual(ct, EntityType.SCHEDULE)
Exemple #11
0
 def test_target(self):
     ct = get_entity_type_from_string('target')
     self.assertEqual(ct, EntityType.TARGET)
Exemple #12
0
 def test_scanner(self):
     ct = get_entity_type_from_string('scanner')
     self.assertEqual(ct, EntityType.SCANNER)
Exemple #13
0
    def test_scan_config(self):
        ct = get_entity_type_from_string('config')
        self.assertEqual(ct, EntityType.SCAN_CONFIG)

        ct = get_entity_type_from_string('scan_config')
        self.assertEqual(ct, EntityType.SCAN_CONFIG)
Exemple #14
0
 def test_role(self):
     ct = get_entity_type_from_string('role')
     self.assertEqual(ct, EntityType.ROLE)
Exemple #15
0
 def test_asset(self):
     ct = get_entity_type_from_string('asset')
     self.assertEqual(ct, EntityType.ASSET)
Exemple #16
0
 def test_tls_certificate(self):
     ft = get_entity_type_from_string('tls_certificate')
     self.assertEqual(ft, EntityType.TLS_CERTIFICATE)
Exemple #17
0
 def test_audit(self):
     ct = get_entity_type_from_string('audit')
     self.assertEqual(ct, EntityType.AUDIT)
Exemple #18
0
 def test_user(self):
     ct = get_entity_type_from_string('user')
     self.assertEqual(ct, EntityType.USER)
Exemple #19
0
 def test_cpe(self):
     ct = get_entity_type_from_string('cpe')
     self.assertEqual(ct, EntityType.CPE)
Exemple #20
0
    def test_vulnerability(self):
        ct = get_entity_type_from_string('vuln')
        self.assertEqual(ct, EntityType.VULNERABILITY)

        ct = get_entity_type_from_string('vulnerability')
        self.assertEqual(ct, EntityType.VULNERABILITY)
Exemple #21
0
 def test_dfn_cert_adv(self):
     ct = get_entity_type_from_string('dfn_cert_adv')
     self.assertEqual(ct, EntityType.DFN_CERT_ADV)
Exemple #22
0
 def test_invalid(self):
     with self.assertRaises(InvalidArgument):
         get_entity_type_from_string('foo')
Exemple #23
0
 def test_group(self):
     ct = get_entity_type_from_string('group')
     self.assertEqual(ct, EntityType.GROUP)
Exemple #24
0
 def test_none_or_empty(self):
     ct = get_entity_type_from_string(None)
     self.assertIsNone(ct)
     ct = get_entity_type_from_string('')
     self.assertIsNone(ct)
Exemple #25
0
 def test_info(self):
     ct = get_entity_type_from_string('info')
     self.assertEqual(ct, EntityType.INFO)
Exemple #26
0
 def test_agent(self):
     with self.assertRaises(InvalidArgument):
         get_entity_type_from_string('agent')
Exemple #27
0
 def test_nvt(self):
     ct = get_entity_type_from_string('nvt')
     self.assertEqual(ct, EntityType.NVT)
Exemple #28
0
 def test_alert(self):
     ct = get_entity_type_from_string('alert')
     self.assertEqual(ct, EntityType.ALERT)
Exemple #29
0
 def test_ovaldef(self):
     ct = get_entity_type_from_string('ovaldef')
     self.assertEqual(ct, EntityType.OVALDEF)
Exemple #30
0
 def test_report_format(self):
     ct = get_entity_type_from_string('report_format')
     self.assertEqual(ct, EntityType.REPORT_FORMAT)