Skip to content

Commit

Permalink
attempt to access secrets differently
Browse files Browse the repository at this point in the history
adds typing to secret

formats code
  • Loading branch information
willi-mueller committed Sep 2, 2024
1 parent f97665c commit eb2b1b3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/sources/rest_api/integration/test_rest_api_source.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import dlt
import pytest
from dlt.common.typing import TSecretStrValue


@pytest.mark.parametrize(
Expand All @@ -11,4 +13,7 @@
def test_all_examples(example_name: str) -> None:
from dlt.sources import rest_api_pipeline

# reroute token location from secrets
github_token: TSecretStrValue = dlt.secrets.get("sources.github.access_token")
dlt.secrets["sources.rest_api_pipeline.github.access_token"] = github_token
getattr(rest_api_pipeline, example_name)()

0 comments on commit eb2b1b3

Please sign in to comment.