def assertSetter(self, value, expected): """Constructs an AdWordsClient and sets value using setters.. Tests that the provided value is parsed to the expected value in the setter methods method. Args: value: multiple Value to test. expected: multiple Expected value. """ client = AdWordsClient(headers={ 'authToken': '...', 'clientCustomerId': '1234567890', 'userAgent': 'GoogleTest', 'developerToken': '[email protected]++USD' }) client.partial_failure = value client.validate_only = value self.assertEquals(client.partial_failure, expected)
def assertSetter(self, value, expected): """Constructs an AdWordsClient and sets value using setters.. Tests that the provided value is parsed to the expected value in the setter methods method. Args: value: multiple Value to test. expected: multiple Expected value. """ client = AdWordsClient( headers={ 'authToken': '...', 'clientCustomerId': '1234567890', 'userAgent': 'GoogleTest', 'developerToken': '[email protected]++USD' }) client.partial_failure = value client.validate_only = value self.assertEquals(client.partial_failure, expected)
__author__ = '[email protected] (Kevin Winter)' import os import re import sys sys.path.append(os.path.join('..', '..', '..', '..')) # Import appropriate classes from the client library. from adspygoogle.adwords.AdWordsClient import AdWordsClient # Initialize client object. client = AdWordsClient(path=os.path.join('..', '..', '..', '..')) # Enable partial failure. client.partial_failure = True # Initialize appropriate service. ad_group_criterion_service = client.GetAdGroupCriterionService( 'https://adwords-sandbox.google.com', 'v201101') ad_group_id = 'INSERT_AD_GROUP_ID_HERE' # Construct keyword ad group criteria objects. keywords = [{ 'xsi_type': 'BiddableAdGroupCriterion', 'adGroupId': ad_group_id, 'criterion': { 'xsi_type': 'Keyword', 'matchType': 'BROAD', 'text': 'mars cruise'
__author__ = '[email protected] (Kevin Winter)' import os import re import sys sys.path.append(os.path.join('..', '..', '..', '..')) # Import appropriate classes from the client library. from adspygoogle.adwords.AdWordsClient import AdWordsClient # Initialize client object. client = AdWordsClient(path=os.path.join('..', '..', '..', '..')) # Enable partial failure. client.partial_failure = True # Initialize appropriate service. ad_group_criterion_service = client.GetAdGroupCriterionService( 'https://adwords-sandbox.google.com', 'v201101') ad_group_id = 'INSERT_AD_GROUP_ID_HERE' # Construct keyword ad group criteria objects. keywords = [ { 'xsi_type': 'BiddableAdGroupCriterion', 'adGroupId': ad_group_id, 'criterion': { 'xsi_type': 'Keyword', 'matchType': 'BROAD',