Add tests#204
Merged
smaeda-ks merged 4 commits intoxdevplatform:masterfrom Jul 23, 2019
Merged
Conversation
- fix function name - add new assert to check request URL (query parameter) to make sure optional parameters are passed as intended
jbabichjapan
approved these changes
Jul 22, 2019
when: - there's no resource property for the class (e.g., TargetingCriteria) - the class is inherited to other class
5d94ded to
3d6f410
Compare
smaeda-ks
commented
Jul 23, 2019
| request = Request(account.client, 'get', resource, params=params) | ||
|
|
||
| return Cursor(klass, request, init_with=[account]) | ||
| return Cursor(None, request, init_with=[account]) |
Contributor
Author
There was a problem hiding this comment.
Otherwise, this behaves differently when this method is called directly from Analytics class Analytics.async_stats_job_result() vs called through inherited class Campaign.async_stats_job_result(). The later one returns campaign instance and can't access return values as the Campaign class obviously doesn't have resource property for the Analytics endpoint.
https://github.com/twitterdev/twitter-python-ads-sdk/blob/master/twitter_ads/cursor.py#L96-L102
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
async_stats_job_result()method in Analytics class 65ea9ef