diff --git a/tests/conftest.py b/tests/conftest.py index c43ea92e7..bcc24cbeb 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -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") diff --git a/tests/integration/orchestration/prefect/flows/test_mediatool.py b/tests/integration/orchestration/prefect/flows/test_mediatool.py index e74e8aea8..280f3d33e 100644 --- a/tests/integration/orchestration/prefect/flows/test_mediatool.py +++ b/tests/integration/orchestration/prefect/flows/test_mediatool.py @@ -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, )