1
0
mirror of synced 2025-12-25 02:09:19 -05:00

Source Bing Ads: add foreign keys (#32131)

Co-authored-by: darynaishchenko <darynaishchenko@users.noreply.github.com>
This commit is contained in:
Daryna Ishchenko
2023-11-06 11:14:58 +02:00
committed by GitHub
parent 1afab61047
commit 1a2fd7b255
8 changed files with 67 additions and 5 deletions

View File

@@ -230,3 +230,20 @@ def test_bulk_stream_read_with_chunks(mocked_client, config):
"Tracking Template": None,
"Type": "App Install Ad",
}
@patch.object(source_bing_ads.source, "Client")
def test_transform(mocked_client, config):
record = {"AdFormatPreference": "All", "DevicePreference": 0, "EditorialStatus": "ActiveLimited", "FinalAppUrls": None}
transformed_record = Ads(mocked_client, config).transform(
record=record, stream_slice={"ad_group_id": 90909090, "account_id": 909090, "customer_id": 9090909}
)
assert transformed_record == {
"AccountId": 909090,
"AdFormatPreference": "All",
"AdGroupId": 90909090,
"CustomerId": 9090909,
"DevicePreference": 0,
"EditorialStatus": "ActiveLimited",
"FinalAppUrls": None,
}