示例#1
0
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
示例#2
0
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
示例#3
0
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
示例#4
0
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