Skip to content

Commit

Permalink
test api key
Browse files Browse the repository at this point in the history
  • Loading branch information
ZehraVictoria committed Nov 5, 2024
1 parent bdc9259 commit e46acf2
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions tests/test_state.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,15 @@ def test_cancel_upload(app_state: AppState) -> None:

def get_test_key() -> str:
settings = DropSettings.get()
secret_key = [ # noqa: RUF015
secret_key = [
key for key, x_sys in settings.drop_api_key_database.items() if "test" in x_sys
][0]
return secret_key.get_secret_value()
]
if not secret_key:
raise ValueError(
"Test key not found in Database."
f"{[item for item in settings.drop_api_key_database.items()]}"
)
return secret_key[0].get_secret_value()


@pytest.mark.asyncio(loop_scope="function")
Expand Down

0 comments on commit e46acf2

Please sign in to comment.