Esempio n. 1
0
 def test_host(self):
     ct = get_asset_type_from_string('host')
     self.assertEqual(ct, AssetType.HOST)
Esempio n. 2
0
 def test_none_or_empty(self):
     ct = get_asset_type_from_string(None)
     self.assertIsNone(ct)
     ct = get_asset_type_from_string('')
     self.assertIsNone(ct)
Esempio n. 3
0
    def test_os(self):
        ct = get_asset_type_from_string('os')
        self.assertEqual(ct, AssetType.OPERATING_SYSTEM)

        ct = get_asset_type_from_string('operating_system')
        self.assertEqual(ct, AssetType.OPERATING_SYSTEM)
Esempio n. 4
0
 def test_invalid(self):
     with self.assertRaises(InvalidArgument):
         get_asset_type_from_string('foo')