From 5a4accefd5cc75f52e49755cb34724c4a651293e Mon Sep 17 00:00:00 2001 From: Robert Jambrecic Date: Wed, 11 Sep 2024 08:00:47 +0000 Subject: [PATCH] Updated ad copy structure --- google_sheets/data_processing/processing.py | 3 ++- tests/app/test_app.py | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/google_sheets/data_processing/processing.py b/google_sheets/data_processing/processing.py index 2fc9903..244ac1a 100644 --- a/google_sheets/data_processing/processing.py +++ b/google_sheets/data_processing/processing.py @@ -251,11 +251,12 @@ def process_data_f( ].str.upper() template_df["Language Code"] = template_df["Language Code"].str.upper() new_campaign_df["Language Code"] = new_campaign_df["Language Code"].str.upper() + on = ["Language Code", "Match Type"] if target_resource == "ad" else "Language Code" template_df = pd.merge( merged_campaigns_ad_groups_df, template_df, how="inner", - on="Language Code", + on=on, ) _validate_language_codes( diff --git a/tests/app/test_app.py b/tests/app/test_app.py index 8dd520a..610bdf7 100644 --- a/tests/app/test_app.py +++ b/tests/app/test_app.py @@ -514,6 +514,7 @@ async def test_process_data_ads(self) -> None: "Description Line 2", "Path 1", "Path 2", + "Match Type", ], [ "EN", @@ -526,6 +527,7 @@ async def test_process_data_ads(self) -> None: "Description Line 2", "Path 1", "Path 2", + "Exact", ], ] )