Пример #1
0
    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), '')
Пример #2
0
    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), '')