Example #1
0
 def test_load(self):
     ref = Entity()
     stream = StringIO(ref.dumps(SUPER_SECURE_PASSWORD))
     other = Entity.load(stream, SUPER_SECURE_PASSWORD)
     self.assertEqual(ref.private_key, other.private_key)
Example #2
0
 def test_loads(self):
     ref = Entity()
     value = ref.dumps(SUPER_SECURE_PASSWORD)
     other = Entity.loads(value, SUPER_SECURE_PASSWORD)
     self.assertEqual(ref.private_key, other.private_key)