Skip to content

Commit

Permalink
Clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
dmannarino committed Jan 22, 2024
1 parent 8d81391 commit f642d16
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 8 deletions.
1 change: 0 additions & 1 deletion app/utils/aws.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ def client():
async def invoke_lambda(
lambda_name: str, payload: Dict[str, Any], timeout: int = 55
) -> httpx.Response:

auth = _aws_auth("lambda")
headers = {"X-Amz-Invocation-Type": "RequestResponse"}

Expand Down
7 changes: 3 additions & 4 deletions app/utils/google.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,13 @@ async def get_prefix_objects(bucket: str, prefix: str) -> List[str]:
"https://www.googleapis.com/auth/devstorage.read_only",
"https://www.googleapis.com/auth/cloud-platform.read-only",
],
**service_account_info
**service_account_info,
)

async with aiogoogle.Aiogoogle(service_account_creds=creds) as aiogoogle_api:
storage = await aiogoogle_api.discover('storage', 'v1')
storage = await aiogoogle_api.discover("storage", "v1")
response: aiogoogle.models.Response = await aiogoogle_api.as_service_account(
storage.objects.list(bucket=bucket, prefix=prefix),
full_res=True
storage.objects.list(bucket=bucket, prefix=prefix), full_res=True
)
results = response.json.get("items", [])

Expand Down
3 changes: 0 additions & 3 deletions tests_v2/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
from fastapi.testclient import TestClient
from httpx import AsyncClient

from app import routes
from app.authentication.token import get_user, is_admin, is_service_account
from app.crud import api_keys
from app.models.enum.change_log import ChangeLogStatus
Expand Down Expand Up @@ -344,7 +343,6 @@ async def licensed_version(
async def apikey(
async_client: AsyncClient, monkeypatch: MonkeyPatch
) -> AsyncGenerator[Tuple[str, Dict[str, Any]], None]:

monkeypatch.setattr(api_keys, "add_api_key_to_gateway", void_coroutine)
monkeypatch.setattr(api_keys, "delete_api_key_from_gateway", void_coroutine)
# Get API Key
Expand All @@ -370,7 +368,6 @@ async def apikey(
async def apikey_unrestricted(
async_client: AsyncClient, monkeypatch: MonkeyPatch
) -> AsyncGenerator[Tuple[str, Dict[str, Any]], None]:

monkeypatch.setattr(api_keys, "add_api_key_to_gateway", void_coroutine)
monkeypatch.setattr(api_keys, "delete_api_key_from_gateway", void_coroutine)
# Get API Key
Expand Down

0 comments on commit f642d16

Please sign in to comment.