def ecdsakey_with_invalid_format_serialization_test(self):
     ecdsa = ECDSAKey()
     with self.assertRaises(ValueError):
         ecdsa.serialize('invalid')
 def ecdsakey_with_json_format_serialization_test(self):
     ecdsa = ECDSAKey()
     ecdsa_json = ecdsa.serialize('json')
     self.assertEqual(type(ecdsa_json), str)
 def ecdsakey_with_yaml_format_serialization_test(self):
     ecdsa = ECDSAKey()
     ecdsa_yaml = ecdsa.serialize('yaml')
     self.assertEqual(type(ecdsa_yaml), str)
Beispiel #4
0
 def ecdsakey_with_invalid_format_serialization_test(self):
     ecdsa = ECDSAKey()
     with self.assertRaises(ValueError):
         ecdsa.serialize('invalid')
Beispiel #5
0
 def ecdsakey_with_json_format_serialization_test(self):
     ecdsa = ECDSAKey()
     ecdsa_json = ecdsa.serialize('json')
     self.assertEqual(type(ecdsa_json), str)
Beispiel #6
0
 def ecdsakey_with_yaml_format_serialization_test(self):
     ecdsa = ECDSAKey()
     ecdsa_yaml = ecdsa.serialize('yaml')
     self.assertEqual(type(ecdsa_yaml), str)