Commit 0c5bbd4
committed
This commit introduces a new test suite for the
The tests are located in the `examples/audience_insights/test` directory.
Key features of the test suite:
- Mocks the Google Ads API client (v19) and its services (AudienceInsightsService, GoogleAdsService).
- Includes tests for the three main functions:
- `audience_composition_insights`: Verifies correct API call parameters (customer_id, audience definition, dimensions) and response handling.
- `generate_suggested_targeting_insights`: Verifies correct API call parameters and response handling.
- `list_audience_insights_attributes`: Verifies correct API call parameters, dimension usage, and processing of results.
- Includes a test for the `main()` function's logic to ensure it correctly orchestrates calls to the helper functions with appropriate arguments.
- Includes a test for the script's command-line entry point (`if __name__ == "__main__":`) to verify argument parsing and client initialization.
- All tests are designed to use and verify Google Ads API v19 objects and enums.
- The test suite can be run using standard Python unittest mechanisms.generate_audience_insights.py script.1 parent 550817d commit 0c5bbd4
File tree
3 files changed
+397
-0
lines changed- examples/audience_insights
- test
3 files changed
+397
-0
lines changedWhitespace-only changes.
Whitespace-only changes.
0 commit comments