当前位置: 首页>>代码示例>>Python>>正文


Python Bulk.exports方法代码示例

本文整理汇总了Python中pyeloqua.Bulk.exports方法的典型用法代码示例。如果您正苦于以下问题:Python Bulk.exports方法的具体用法?Python Bulk.exports怎么用?Python Bulk.exports使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在pyeloqua.Bulk的用法示例。


在下文中一共展示了Bulk.exports方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: test_post_data_except_import

# 需要导入模块: from pyeloqua import Bulk [as 别名]
# 或者: from pyeloqua.Bulk import exports [as 别名]
def test_post_data_except_import(mock_post):
    """ post data to an export definition """
    bulk = Bulk(test=True)
    bulk.exports('contacts')
    bulk.job_def = EXPORT_JOB_DEF
    mock_post.return_value = Mock(ok=True, status_code=201)
    bulk.post_data(IMPORT_TEST_DATA)
开发者ID:colemanja91,项目名称:pyeloqua,代码行数:9,代码来源:test_bulk_postdata.py

示例2: test_leadscore_fields_noparams

# 需要导入模块: from pyeloqua import Bulk [as 别名]
# 或者: from pyeloqua.Bulk import exports [as 别名]
def test_leadscore_fields_noparams(mock_get):
    """ add fields from a lead score model by model name """
    bulk = Bulk(test=True)
    bulk.exports('contacts')
    mock_get.return_value = Mock(ok=True, status_code=200)
    mock_get.return_value.json.return_value = deepcopy(LEADSCORE_MODEL_NAME)
    bulk.add_leadscore_fields()
开发者ID:colemanja91,项目名称:pyeloqua,代码行数:9,代码来源:test_bulk_fields.py

示例3: test_asset_exists_list_none

# 需要导入模块: from pyeloqua import Bulk [as 别名]
# 或者: from pyeloqua.Bulk import exports [as 别名]
def test_asset_exists_list_none(mock_get):
    """ add exists filter - exception on no params """
    bulk = Bulk(test=True)
    bulk.exports('contacts')
    mock_get.return_value = Mock(ok=True, status_code=200)
    mock_get.return_value.json.return_value = deepcopy(GOOD_LIST_NAME)
    bulk.asset_exists(asset='lists')
开发者ID:colemanja91,项目名称:pyeloqua,代码行数:9,代码来源:test_bulk_filters.py

示例4: test_add_fields_actvty

# 需要导入模块: from pyeloqua import Bulk [as 别名]
# 或者: from pyeloqua.Bulk import exports [as 别名]
def test_add_fields_actvty():
    """ add some activity fields """
    bulk = Bulk(test=True)
    bulk.exports('activities', act_type='EmailOpen')
    fields = ['ActivityId', 'AssetId']
    bulk.add_fields(fields)
    assert len(bulk.job['fields']) == 2
开发者ID:colemanja91,项目名称:pyeloqua,代码行数:9,代码来源:test_bulk_fields.py

示例5: test_filter_date_badstr_end

# 需要导入模块: from pyeloqua import Bulk [as 别名]
# 或者: from pyeloqua.Bulk import exports [as 别名]
def test_filter_date_badstr_end(mock_get):
    """ exception when bad datetime string passed - end """
    bulk = Bulk(test=True)
    bulk.exports('contacts')
    mock_get.return_value = Mock(ok=True, status_code=200)
    mock_get.return_value.json.return_value = deepcopy(GOOD_CONTACT_FIELDS)
    bulk.filter_date(field='created', end='2017-01- 00:00:00')
开发者ID:colemanja91,项目名称:pyeloqua,代码行数:9,代码来源:test_bulk_filters.py

示例6: test_start_sync_export_nodef

# 需要导入模块: from pyeloqua import Bulk [as 别名]
# 或者: from pyeloqua.Bulk import exports [as 别名]
def test_start_sync_export_nodef(mock_post):
    """ except when no job_def """
    bulk = Bulk(test=True)
    bulk.exports('contacts')
    mock_post.return_value = Mock(ok=True, status_code=200)
    mock_post.return_value.json.return_value = deepcopy(SYNC_RESPONSE)
    bulk.start_sync()
开发者ID:colemanja91,项目名称:pyeloqua,代码行数:9,代码来源:test_bulk_sync.py

示例7: test_option_add_all

# 需要导入模块: from pyeloqua import Bulk [as 别名]
# 或者: from pyeloqua.Bulk import exports [as 别名]
def test_option_add_all():
    """ add several random options """
    bulk = Bulk(test=True)
    bulk.exports('contacts')
    bulk.add_options(identifierFieldName='C_EmailAddress',
                     areSystemTimestampsInUTC=True)
    assert len(bulk.job['options']) == 2
开发者ID:colemanja91,项目名称:pyeloqua,代码行数:9,代码来源:test_bulk_options.py

示例8: test_get_fields_cntcts_return

# 需要导入模块: from pyeloqua import Bulk [as 别名]
# 或者: from pyeloqua.Bulk import exports [as 别名]
def test_get_fields_cntcts_return(mock_get):
    """ find all contact fields - return correct items """
    bulk = Bulk(test=True)
    bulk.exports('contacts')
    mock_get.return_value = Mock(ok=True, status_code=200)
    mock_get.return_value.json.return_value = deepcopy(GOOD_FIELDS)
    fields = bulk.get_fields()
    assert fields == ALL_CONTACT_FIELDS
开发者ID:colemanja91,项目名称:pyeloqua,代码行数:10,代码来源:test_bulk_fields.py

示例9: test_get_export_data_rt

# 需要导入模块: from pyeloqua import Bulk [as 别名]
# 或者: from pyeloqua.Bulk import exports [as 别名]
def test_get_export_data_rt(mock_data):
    """ get data from a synced export - return data """
    bulk = Bulk(test=True)
    bulk.exports('contacts')
    bulk.job_def = EXPORT_JOB_DEF
    mock_data.return_value = RETURN_DATA['items']
    data = bulk.get_export_data()
    assert data == RETURN_DATA['items']
开发者ID:colemanja91,项目名称:pyeloqua,代码行数:10,代码来源:test_bulk_getdata.py

示例10: test_leadscore_fields_name

# 需要导入模块: from pyeloqua import Bulk [as 别名]
# 或者: from pyeloqua.Bulk import exports [as 别名]
def test_leadscore_fields_name(mock_get):
    """ add fields from a lead score model by model name """
    bulk = Bulk(test=True)
    bulk.exports('contacts')
    mock_get.return_value = Mock(ok=True, status_code=200)
    mock_get.return_value.json.return_value = deepcopy(LEADSCORE_MODEL_NAME)
    bulk.add_leadscore_fields(name='Model 1')
    assert bulk.job['fields'] == LEADSCORE_MODEL_FIELDS
开发者ID:colemanja91,项目名称:pyeloqua,代码行数:10,代码来源:test_bulk_fields.py

示例11: test_event_lnk_cntct_fields

# 需要导入模块: from pyeloqua import Bulk [as 别名]
# 或者: from pyeloqua.Bulk import exports [as 别名]
def test_event_lnk_cntct_fields(mock_get):
    """ add some linked contact fields to event """
    bulk = Bulk(test=True)
    bulk.exports('events', 1)
    mock_get.return_value = Mock(ok=True, status_code=200)
    mock_get.return_value.json.return_value = deepcopy(GOOD_FIELDS)
    bulk.add_linked_fields('contacts', ['C_EmailAddress', 'C_FirstName'])
    assert bulk.job['fields'] == LINKED_EVENT_CONTACT_FIELDS
开发者ID:colemanja91,项目名称:pyeloqua,代码行数:10,代码来源:test_bulk_fields.py

示例12: test_cntct_lnk_acct_fields

# 需要导入模块: from pyeloqua import Bulk [as 别名]
# 或者: from pyeloqua.Bulk import exports [as 别名]
def test_cntct_lnk_acct_fields(mock_get):
    """ add some linked account fields """
    bulk = Bulk(test=True)
    bulk.exports('contacts')
    mock_get.return_value = Mock(ok=True, status_code=200)
    mock_get.return_value.json.return_value = deepcopy(GOOD_FIELDS_ACCOUNT)
    bulk.add_linked_fields('accounts', ['M_CompanyName', 'M_Country'])
    assert bulk.job['fields'] == LINKED_ACCOUNT_FIELDS
开发者ID:colemanja91,项目名称:pyeloqua,代码行数:10,代码来源:test_bulk_fields.py

示例13: test_accnt_system_fields_set

# 需要导入模块: from pyeloqua import Bulk [as 别名]
# 或者: from pyeloqua.Bulk import exports [as 别名]
def test_accnt_system_fields_set(mock_get):
    """ add some account system fields """
    bulk = Bulk(test=True)
    bulk.exports('accounts')
    mock_get.return_value = Mock(ok=True, status_code=200)
    mock_get.return_value.json.return_value = deepcopy(GOOD_FIELDS)
    bulk.add_fields(['accountID', 'createdAt'])
    assert len(bulk.job['fields']) == 2
开发者ID:colemanja91,项目名称:pyeloqua,代码行数:10,代码来源:test_bulk_fields.py

示例14: test_add_fields_notfound

# 需要导入模块: from pyeloqua import Bulk [as 别名]
# 或者: from pyeloqua.Bulk import exports [as 别名]
def test_add_fields_notfound(mock_get):
    """ raise exception when field not found """
    bulk = Bulk(test=True)
    bulk.exports('contacts')
    mock_get.return_value = Mock(ok=True, status_code=200)
    mock_get.return_value.json.return_value = deepcopy(GOOD_FIELDS)
    fields = ['C_EmailAddress', 'C_FirstName', 'C_LastName']
    bulk.add_fields(fields)
开发者ID:colemanja91,项目名称:pyeloqua,代码行数:10,代码来源:test_bulk_fields.py

示例15: test_get_fields_specify

# 需要导入模块: from pyeloqua import Bulk [as 别名]
# 或者: from pyeloqua.Bulk import exports [as 别名]
def test_get_fields_specify(mock_get):
    """ specify elq_object to return fields for """
    bulk = Bulk(test=True)
    bulk.exports('accounts')
    mock_get.return_value = Mock(ok=True, status_code=200)
    mock_get.return_value.json.return_value = deepcopy(GOOD_FIELDS)
    fields = bulk.get_fields(elq_object='contacts')
    assert fields == ALL_CONTACT_FIELDS
开发者ID:colemanja91,项目名称:pyeloqua,代码行数:10,代码来源:test_bulk_fields.py


注:本文中的pyeloqua.Bulk.exports方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。