本文整理汇总了Python中pyeloqua.Bulk.get_fields方法的典型用法代码示例。如果您正苦于以下问题:Python Bulk.get_fields方法的具体用法?Python Bulk.get_fields怎么用?Python Bulk.get_fields使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pyeloqua.Bulk
的用法示例。
在下文中一共展示了Bulk.get_fields方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_get_fields_events_call
# 需要导入模块: from pyeloqua import Bulk [as 别名]
# 或者: from pyeloqua.Bulk import get_fields [as 别名]
def test_get_fields_events_call(mock_get):
""" find all event fields """
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.get_fields()
url = bulk.bulk_base + '/events/1/fields?limit=1000&offset=0'
mock_get.assert_any_call(url=url, auth=bulk.auth)
示例2: test_get_fields_cntcts_call
# 需要导入模块: from pyeloqua import Bulk [as 别名]
# 或者: from pyeloqua.Bulk import get_fields [as 别名]
def test_get_fields_cntcts_call(mock_get):
""" find all contact fields - correct 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(GOOD_FIELDS)
bulk.get_fields()
url = bulk.bulk_base + '/contacts/fields?limit=1000&offset=0'
mock_get.assert_any_call(url=url, auth=bulk.auth)
示例3: test_get_fields_specify
# 需要导入模块: from pyeloqua import Bulk [as 别名]
# 或者: from pyeloqua.Bulk import get_fields [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
示例4: test_get_fields_cntcts_return
# 需要导入模块: from pyeloqua import Bulk [as 别名]
# 或者: from pyeloqua.Bulk import get_fields [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
示例5: test_get_fields_actvty_return
# 需要导入模块: from pyeloqua import Bulk [as 别名]
# 或者: from pyeloqua.Bulk import get_fields [as 别名]
def test_get_fields_actvty_return():
""" find all contact fields - return correct items """
bulk = Bulk(test=True)
bulk.exports('activities', act_type='EmailOpen')
fields = bulk.get_fields()
assert fields == ACTIVITY_FIELDS['EmailOpen']