本文整理汇总了Python中eums.services.contact_service.ContactService.update_after_delivery_creation方法的典型用法代码示例。如果您正苦于以下问题:Python ContactService.update_after_delivery_creation方法的具体用法?Python ContactService.update_after_delivery_creation怎么用?Python ContactService.update_after_delivery_creation使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类eums.services.contact_service.ContactService
的用法示例。
在下文中一共展示了ContactService.update_after_delivery_creation方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: update_contact
# 需要导入模块: from eums.services.contact_service import ContactService [as 别名]
# 或者: from eums.services.contact_service.ContactService import update_after_delivery_creation [as 别名]
def update_contact(runnable):
tree_position = getattr(runnable, 'tree_position', Flow.Label.IMPLEMENTING_PARTNER)
ContactService.update_after_delivery_creation(runnable.contact_person_id,
tree_position,
runnable.programme.name,
runnable.location,
runnable.consignee.name)
示例2: test_should_not_update_contact_when_contact_not_modified
# 需要导入模块: from eums.services.contact_service import ContactService [as 别名]
# 或者: from eums.services.contact_service.ContactService import update_after_delivery_creation [as 别名]
def test_should_not_update_contact_when_contact_not_modified(self, update, get):
get.return_value = CONTACT
update.return_value = 200
ContactService.update_after_delivery_creation(CONTACT['_id'], type='End-user',
outcome='YI105 - PCR 1 KEEP CHILDREN AND MOTHERS',
ip='WAKISO DHA', district='Wakiso')
ContactService.get.assert_called_once_with(CONTACT['_id'])
ContactService.update.assert_not_called(CONTACT)