def deactivated_secret(credential): secret = models.CredentialSecret(key='username', value='full_access_value', credential=credential) secret.deleted = True with username_on_model(models.CredentialSecret, 'initial'): secret.save() return secret
def my_other_secret(my_other_credential): secret = models.CredentialSecret(key="access_token", value="full_access_value", credential=my_other_credential) with username_on_model(models.CredentialSecret, "initial"): secret.save() return secret
def deactivated_secret(credential): secret = models.CredentialSecret(key="username", value="full_access_value", credential=credential) secret.deleted = True with username_on_model(models.CredentialSecret, "initial"): secret.save() return secret
def not_my_secret(not_my_credential): secret = models.CredentialSecret(key='access_token', value='full_access_value', credential=not_my_credential) with username_on_model(models.CredentialSecret, 'initial'): secret.save() return secret