本文整理汇总了Python中pyeloqua.Bulk.write_job方法的典型用法代码示例。如果您正苦于以下问题:Python Bulk.write_job方法的具体用法?Python Bulk.write_job怎么用?Python Bulk.write_job使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pyeloqua.Bulk
的用法示例。
在下文中一共展示了Bulk.write_job方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_writebulkjob
# 需要导入模块: from pyeloqua import Bulk [as 别名]
# 或者: from pyeloqua.Bulk import write_job [as 别名]
def test_writebulkjob(mock_dump):
""" ensure job def calls json.dump """
bulk = Bulk(test=True)
bulk.job = JOB_EXPORTS_CONTACTS
mock_dump.return_value = None
bulk.write_job('/tmp/pyeloqua_test_bulk_write.json')
assert mock_dump.called
示例2: test_readbulkjob
# 需要导入模块: from pyeloqua import Bulk [as 别名]
# 或者: from pyeloqua.Bulk import write_job [as 别名]
def test_readbulkjob():
""" import correctly sets Bulk.job """
bulk1 = Bulk(test=True)
bulk1.job = JOB_EXPORTS_CONTACTS
bulk1.write_job('/tmp/pyeloqua_test_bulk_write.json')
bulk2 = Bulk(test=True)
bulk2.read_job('/tmp/pyeloqua_test_bulk_write.json')
assert bulk2.job == bulk1.job