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


Python VerificationStatus.get_location_id方法代码示例

本文整理汇总了Python中verify_student.models.VerificationStatus.get_location_id方法的典型用法代码示例。如果您正苦于以下问题:Python VerificationStatus.get_location_id方法的具体用法?Python VerificationStatus.get_location_id怎么用?Python VerificationStatus.get_location_id使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在verify_student.models.VerificationStatus的用法示例。


在下文中一共展示了VerificationStatus.get_location_id方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: test_get_location_id

# 需要导入模块: from verify_student.models import VerificationStatus [as 别名]
# 或者: from verify_student.models.VerificationStatus import get_location_id [as 别名]
    def test_get_location_id(self):
        """
        Getting location id for a specific checkpoint.
        """

        # creating software secure attempt against checkpoint
        self.first_checkpoint.add_verification_attempt(SoftwareSecurePhotoVerification.objects.create(user=self.user))

        # add initial verification status for checkpoint
        VerificationStatus.add_verification_status(checkpoint=self.first_checkpoint, user=self.user, status="submitted")
        attempt = SoftwareSecurePhotoVerification.objects.filter(user=self.user)

        self.assertIsNotNone(VerificationStatus.get_location_id(attempt))
        self.assertEqual(VerificationStatus.get_location_id(None), "")
开发者ID:chauhanhardik,项目名称:populo,代码行数:16,代码来源:test_models.py

示例2: test_get_location_id

# 需要导入模块: from verify_student.models import VerificationStatus [as 别名]
# 或者: from verify_student.models.VerificationStatus import get_location_id [as 别名]
    def test_get_location_id(self):
        """ Getting location id for a specific checkpoint  """

        # creating software secure attempt against checkpoint
        self.check_point1.add_verification_attempt(SoftwareSecurePhotoVerification.objects.create(user=self.user))

        # add initial verification status for checkpoint
        VerificationStatus.add_verification_status(
            checkpoint=self.check_point1,
            user=self.user,
            status='submitted',
            location_id=self.dummy_reverification_item_id_1
        )

        attempt = SoftwareSecurePhotoVerification.objects.filter(user=self.user)

        self.assertIsNotNone(VerificationStatus.get_location_id(attempt))
        self.assertEqual(VerificationStatus.get_location_id(None), '')
开发者ID:Shubhi01,项目名称:edx-platform,代码行数:20,代码来源:test_models.py


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