当前位置: 首页>>代码示例>>Python>>正文


Python SoftwareSecurePhotoVerification.original_verification方法代码示例

本文整理汇总了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)
开发者ID:escolaglobal,项目名称:edx-platform,代码行数:12,代码来源:test_models.py

示例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
开发者ID:189140879,项目名称:edx-platform,代码行数:20,代码来源:fake_software_secure.py


注:本文中的verify_student.models.SoftwareSecurePhotoVerification.original_verification方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。