本文整理汇总了Python中indico.modules.events.agreements.models.agreements.Agreement.reject方法的典型用法代码示例。如果您正苦于以下问题:Python Agreement.reject方法的具体用法?Python Agreement.reject怎么用?Python Agreement.reject使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类indico.modules.events.agreements.models.agreements.Agreement
的用法示例。
在下文中一共展示了Agreement.reject方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_reject
# 需要导入模块: from indico.modules.events.agreements.models.agreements import Agreement [as 别名]
# 或者: from indico.modules.events.agreements.models.agreements.Agreement import reject [as 别名]
def test_reject(reason, on_behalf, expected_state):
ip = '127.0.0.1'
agreement = Agreement()
agreement.reject(from_ip=ip, reason=reason, on_behalf=on_behalf)
assert agreement.state == expected_state
assert agreement.signed_from_ip == ip
assert agreement.reason == reason
assert agreement.signed_dt == now_utc()
agreement.definition.handle_rejected.assert_called_with(agreement)