Exemple #1
0
 def test_key_by_id_with_bad_id(self):
     keychain = Keychain(self.data_path)
     key = keychain.key(identifier="not-a-real-key")
     self.assertIsNone(key)
Exemple #2
0
 def test_key_by_id_with_bad_security_level(self):
     keychain = Keychain(self.data_path)
     key = keychain.key(security_level="not-a-real-key")
     self.assertIsNone(key)
Exemple #3
0
 def test_key_by_id(self):
     keychain = Keychain(self.data_path)
     key = keychain.key(identifier="525E210E0B4C49799D7E47DD8E789C78")
     self.assertEquals("525E210E0B4C49799D7E47DD8E789C78", key.identifier)
     self.assertEquals("SL5", key.level)
Exemple #4
0
 def test_key_by_security_level(self):
     keychain = Keychain(self.data_path)
     key = keychain.key(security_level="SL5")
     self.assertEqual("525E210E0B4C49799D7E47DD8E789C78", key.identifier)
     self.assertEqual("SL5", key.level)
Exemple #5
0
 def test_key_by_id_with_bad_id(self):
     keychain = Keychain(self.data_path)
     key = keychain.key(identifier="not-a-real-key")
     self.assertIsNone(key)
Exemple #6
0
 def test_key_by_id(self):
     keychain = Keychain(self.data_path)
     key = keychain.key(identifier="525E210E0B4C49799D7E47DD8E789C78")
     self.assertEqual("525E210E0B4C49799D7E47DD8E789C78", key.identifier)
     self.assertEqual("SL5", key.level)
Exemple #7
0
 def test_key_by_id_with_bad_security_level(self):
     keychain = Keychain(self.data_path)
     key = keychain.key(security_level="not-a-real-key")
     self.assertIsNone(key)
Exemple #8
0
 def test_key_by_security_level(self):
     keychain = Keychain(self.data_path)
     key = keychain.key(security_level="SL5")
     self.assertEquals("525E210E0B4C49799D7E47DD8E789C78", key.identifier)
     self.assertEquals("SL5", key.level)