本文整理汇总了Python中pyeloqua.Bulk.add_leadscore_fields方法的典型用法代码示例。如果您正苦于以下问题:Python Bulk.add_leadscore_fields方法的具体用法?Python Bulk.add_leadscore_fields怎么用?Python Bulk.add_leadscore_fields使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pyeloqua.Bulk
的用法示例。
在下文中一共展示了Bulk.add_leadscore_fields方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_leadscore_fields_noparams
# 需要导入模块: from pyeloqua import Bulk [as 别名]
# 或者: from pyeloqua.Bulk import add_leadscore_fields [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()
示例2: test_leadscore_fields_name
# 需要导入模块: from pyeloqua import Bulk [as 别名]
# 或者: from pyeloqua.Bulk import add_leadscore_fields [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
示例3: test_leadscore_fields_name_call
# 需要导入模块: from pyeloqua import Bulk [as 别名]
# 或者: from pyeloqua.Bulk import add_leadscore_fields [as 别名]
def test_leadscore_fields_name_call(mock_get):
""" lead score model by model name api call """
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')
mock_get.assert_called_with(url=bulk.bulk_base + '/contacts/scoring/models?q="name=Model*1"',
auth=bulk.auth)
示例4: test_leadscore_fields_id_call
# 需要导入模块: from pyeloqua import Bulk [as 别名]
# 或者: from pyeloqua.Bulk import add_leadscore_fields [as 别名]
def test_leadscore_fields_id_call(mock_get):
""" lead score model by model id api call """
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_ID)
bulk.add_leadscore_fields(model_id=1)
mock_get.assert_called_with(url=bulk.bulk_base + '/contacts/scoring/models/1',
auth=bulk.auth)