'Uses a private key to encrypt data on model creation.
Verifies the data is decrypted when reading the value back from the
model.'

def test_char_field_read(self):

    with keys(keyinfo.DECRYPT_AND_ENCRYPT):
        with secret_model() as model:
            test_val = 'Test    Secret'
            secret = model.objects.create(name=test_val)
            retrieved_secret = model.objects.get(id=secret.id)
            self.assertEqual(test_val, retrieved_secret.name)
