本文整理汇总了Python中verify_student.models.SoftwareSecurePhotoVerification.original_verification方法的典型用法代码示例。如果您正苦于以下问题:Python SoftwareSecurePhotoVerification.original_verification方法的具体用法?Python SoftwareSecurePhotoVerification.original_verification怎么用?Python SoftwareSecurePhotoVerification.original_verification使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类verify_student.models.SoftwareSecurePhotoVerification
的用法示例。
在下文中一共展示了SoftwareSecurePhotoVerification.original_verification方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_original_verification
# 需要导入模块: from verify_student.models import SoftwareSecurePhotoVerification [as 别名]
# 或者: from verify_student.models.SoftwareSecurePhotoVerification import original_verification [as 别名]
def test_original_verification(self):
orig_attempt = SoftwareSecurePhotoVerification(user=self.user)
orig_attempt.save()
window = MidcourseReverificationWindowFactory(
course_id=self.course.id,
start_date=datetime.now(pytz.UTC) - timedelta(days=15),
end_date=datetime.now(pytz.UTC) - timedelta(days=13),
)
midcourse_attempt = SoftwareSecurePhotoVerification(user=self.user, window=window)
self.assertEquals(midcourse_attempt.original_verification(user=self.user), orig_attempt)
示例2: response_post_params
# 需要导入模块: from verify_student.models import SoftwareSecurePhotoVerification [as 别名]
# 或者: from verify_student.models.SoftwareSecurePhotoVerification import original_verification [as 别名]
def response_post_params(cls, user):
"""
Calculate the POST params we want to send back to the client.
"""
access_key = settings.VERIFY_STUDENT["SOFTWARE_SECURE"]["API_ACCESS_KEY"]
context = {
'receipt_id': None,
'authorization_code': 'SIS {}:0000'.format(access_key),
'results_callback': reverse('verify_student_results_callback')
}
try:
most_recent = SoftwareSecurePhotoVerification.original_verification(user)
context["receipt_id"] = most_recent.receipt_id
except: # pylint: disable=bare-except
pass
return context