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)
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)