def test_encrypted_fetch(self):
        key = self.get_random_string()
        secret = self.get_random_string()
        self.provider.consumer_key = key
        self.provider.consumer_secret = secret
        self.provider.save()
        provider = Provider.objects.get(pk=self.provider.pk)
        self.assertEqual(provider.consumer_key, key, "Could not decrypt key.")
        self.assertEqual(provider.consumer_secret, secret, "Could not decrypt secret.")
Decrypt key/secret on save.
dataset/ETHPy150Open mlavin/django-all-access/allaccess/tests/test_models.py/ProviderTestCase.test_encrypted_fetch