Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
delinea-rajani authored Jul 1, 2024
1 parent c5ca993 commit 94051b7
Showing 1 changed file with 34 additions and 33 deletions.
67 changes: 34 additions & 33 deletions conftest.py
Original file line number Diff line number Diff line change
@@ -1,33 +1,34 @@
import os
import pytest
from dotenv import load_dotenv
from delinea.secrets.server import PasswordGrantAuthorizer, SecretServerCloud

load_dotenv()


@pytest.fixture
def env_vars():
return {
"username": os.getenv("TSS_USERNAME"),
"password": os.getenv("TSS_PASSWORD"),
"tenant": os.getenv("TSS_TENANT"),
"secret_id": os.getenv("TSS_SECRET_ID"),
"secret_path": os.getenv("TSS_SECRET_PATH"),
"folder_id": os.getenv("TSS_FOLDER_ID"),
"folder_path": os.getenv("TSS_FOLDER_PATH")
}


@pytest.fixture
def authorizer(env_vars):
return PasswordGrantAuthorizer(
f"https://{env_vars['tenant']}.secretservercloud.com",
env_vars["username"],
env_vars["password"],
)


@pytest.fixture
def secret_server(env_vars, authorizer):
return SecretServerCloud(env_vars["tenant"], authorizer)

import os
import pytest
from dotenv import load_dotenv
from delinea.secrets.server import PasswordGrantAuthorizer, SecretServerCloud

load_dotenv()


@pytest.fixture
def env_vars():
return {
"username": os.getenv("TSS_USERNAME"),
"password": os.getenv("TSS_PASSWORD"),
"tenant": os.getenv("TSS_TENANT"),
"secret_id": os.getenv("TSS_SECRET_ID"),
"secret_path": os.getenv("TSS_SECRET_PATH"),
"folder_id": os.getenv("TSS_FOLDER_ID"),
"folder_path": os.getenv("TSS_FOLDER_PATH")
}


@pytest.fixture
def authorizer(env_vars):
return PasswordGrantAuthorizer(
f"https://{env_vars['tenant']}.secretservercloud.com",
env_vars["username"],
env_vars["password"],
)


@pytest.fixture
def secret_server(env_vars, authorizer):
return SecretServerCloud(env_vars["tenant"], authorizer)

0 comments on commit 94051b7

Please sign in to comment.