예제 #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