'Tests that the task used to find "must_retry" SoftwareSecurePhotoVerifications
and re-submit them executes successfully'

def test_retry_failed_photo_verifications(self):

    self.create_and_submit('SuccessfulSally')
    with patch('lms.djangoapps.verify_student.models.requests.post', new=mock_software_secure_post_error):
        self.create_and_submit('RetryRoger')
    with patch('lms.djangoapps.verify_student.models.requests.post', new=mock_software_secure_post_error):
        self.create_and_submit('RetryRick')
    assert_equals(len(SoftwareSecurePhotoVerification.objects.filter(status='submitted')), 1)
    assert_equals(len(SoftwareSecurePhotoVerification.objects.filter(status='must_retry')), 2)
    call_command('retry_failed_photo_verifications')
    attempts_to_retry = SoftwareSecurePhotoVerification.objects.filter(status='must_retry')
    assert_equals(bool(attempts_to_retry), False)
