From ee2071dcf5ad68742f8a451b76ba8f1e745e5835 Mon Sep 17 00:00:00 2001 From: dominikjedlinski Date: Thu, 26 Oct 2023 12:28:26 +0200 Subject: [PATCH] reverted test_aselite_to_adls --- .../integration/flows/test_aselite_to_adls.py | 55 +------------------ 1 file changed, 1 insertion(+), 54 deletions(-) diff --git a/tests/integration/flows/test_aselite_to_adls.py b/tests/integration/flows/test_aselite_to_adls.py index 60022f47e..48146c293 100644 --- a/tests/integration/flows/test_aselite_to_adls.py +++ b/tests/integration/flows/test_aselite_to_adls.py @@ -8,7 +8,7 @@ from prefect.tasks.secrets import PrefectSecret from viadot.flows.aselite_to_adls import ASELiteToADLS -from viadot.task_utils import df_converts_bytes_to_int, df_to_csv, validate_df +from viadot.task_utils import df_converts_bytes_to_int, df_to_csv from viadot.tasks import AzureDataLakeUpload from viadot.tasks.aselite import ASELiteToDF @@ -62,56 +62,3 @@ def test_aselite_to_adls(): assert MAIN_DF.shape == (10, 17) os.remove(TMP_FILE_NAME) - - -def test_aselite_to_adls_validate_success(): - credentials_secret = PrefectSecret("aselite").run() - vault_name = PrefectSecret("AZURE_DEFAULT_KEYVAULT").run() - - query_designer = """SELECT TOP 10 [ID] - ,[SpracheText] - ,[SpracheKat] - ,[SpracheMM] - ,[KatSprache] - ,[KatBasisSprache] - ,[CodePage] - ,[Font] - ,[Neu] - ,[Upd] - ,[UpdL] - ,[LosKZ] - ,[AstNr] - ,[KomKz] - ,[RKZ] - ,[ParentLanguageNo] - ,[UPD_FIELD] - FROM [UCRMDEV].[dbo].[CRM_00]""" - - validate_df_dict = { - "column_size": {"ParentLanguageNo": 1}, - "column_unique_values": ["ID"], - "dataset_row_count": {"min": 0, "max": 10}, - "column_match_regex": {"SpracheText", r"TE_.*"}, - } - - flow = ASELiteToADLS( - "Test flow", - query=query_designer, - sqldb_credentials_secret=credentials_secret, - vault_name=vault_name, - file_path=TMP_FILE_NAME, - validate_df_dict=validate_df_dict, - to_path="raw/supermetrics/mp/result_df_flow_at_des_m.csv", - run_config=None, - ) - - result = flow.run() - assert result.is_successful() - - MAIN_DF = pd.read_csv(TMP_FILE_NAME, delimiter="\t") - - assert isinstance(MAIN_DF, pd.DataFrame) == True - - assert MAIN_DF.shape == (10, 17) - - os.remove(TMP_FILE_NAME)