Skip to content

Commit

Permalink
♻️ Adding missing values to conftest.py
Browse files Browse the repository at this point in the history
  • Loading branch information
mgardzinski committed Sep 27, 2024
1 parent 777354a commit a32f955
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 8 deletions.
20 changes: 20 additions & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,3 +200,23 @@ def databricks_credentials_secret():
@pytest.fixture(scope="session", autouse=True)
def c4c_credentials_secret():
return os.environ.get("VIADOT_TEST_C4C_CREDENTIALS_SECRET")


@pytest.fixture(scope="session", autouse=True)
def MEDIATOOL_TESTS_ORG():
return os.environ.get("MEDIATOOL_TESTS_ORG")


@pytest.fixture(scope="session", autouse=True)
def MEDIATOOL_ADLS_AZURE_KEY_VAULT_SECRET():
return os.environ.get("MEDIATOOL_ADLS_AZURE_KEY_VAULT_SECRET")


@pytest.fixture(scope="session", autouse=True)
def MEDIATOOL_TEST_ADLS_PATH():
return os.environ.get("MEDIATOOL_TEST_ADLS_PATH")


@pytest.fixture(scope="session", autouse=True)
def ADLS_AZURE_KEY_VAULT_SECRET():
return os.environ.get("ADLS_AZURE_KEY_VAULT_SECRET")
38 changes: 30 additions & 8 deletions tests/integration/orchestration/prefect/flows/test_mediatool.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,40 @@
from viadot.orchestration.prefect.flows import mediatool_to_adls


media_entries_columns = [
"_id",
"organizationId",
"mediaTypeId",
"vehicleId",
"startDate",
"endDate",
"businessAreaId",
"campaignObjectiveId",
"campaignId",
"netMediaCostChosenCurrency",
"currencyId",
"eurExchangeRate",
"netMediaCostEur",
"fee",
"totalFeeOfNetMediaCostEur",
"totalCostToClientChosenCurrency",
"totalCostToClientEur",
"nonBiddableMediaCostEur",
]


def test_genesys_to_adls(
azure_key_vault_secret,
organization_ids,
media_entries_columns,
adls_azure_key_vault_secret,
MEDIATOOL_ADLS_AZURE_KEY_VAULT_SECRET,
MEDIATOOL_TESTS_ORG,
MEDIATOOL_TEST_ADLS_PATH,
ADLS_AZURE_KEY_VAULT_SECRET,
):
state = mediatool_to_adls(
azure_key_vault_secret=azure_key_vault_secret,
organization_ids=organization_ids,
azure_key_vault_secret=MEDIATOOL_ADLS_AZURE_KEY_VAULT_SECRET,
organization_ids=MEDIATOOL_TESTS_ORG,
media_entries_columns=media_entries_columns,
adls_path="raw/dyvenia_sandbox/mediatool/mediatool_trial.parquet",
adls_azure_key_vault_secret=adls_azure_key_vault_secret,
adls_path=MEDIATOOL_TEST_ADLS_PATH,
adls_azure_key_vault_secret=ADLS_AZURE_KEY_VAULT_SECRET,
adls_path_overwrite=True,
)

Expand Down

0 comments on commit a32f955

Please sign in to comment.