def toggle_failed_banner_off(request): """ Finds all denied midcourse reverifications for a user and permanently toggles the "Reverification Failed" banner off for those verifications. """ user_id = request.POST.get('user_id') SoftwareSecurePhotoVerification.display_off(user_id)
def toggle_failed_banner_off(request): """ Finds all denied midcourse reverifications for a user and permanently toggles the "Reverification Failed" banner off for those verifications. """ user_id = request.POST.get('user_id') SoftwareSecurePhotoVerification.display_off(user_id)
def toggle_failed_banner_off(request): """ Finds all denied midcourse reverifications for a user and permanently toggles the "Reverification Failed" banner off for those verifications. """ user_id = request.user.id SoftwareSecurePhotoVerification.display_off(user_id) return HttpResponse('Success')
def toggle_failed_banner_off(request): """ Finds all denied midcourse reverifications for a user and permanently toggles the "Reverification Failed" banner off for those verifications. """ user_id = request.user.id SoftwareSecurePhotoVerification.display_off(user_id) return HttpResponse('Success')
def test_display(self): user = UserFactory.create() window = MidcourseReverificationWindowFactory() attempt = SoftwareSecurePhotoVerification(user=user, window=window, status="denied") attempt.save() # We expect the verification to be displayed by default self.assertEquals(SoftwareSecurePhotoVerification.display_status(user, window), True) # Turn it off SoftwareSecurePhotoVerification.display_off(user.id) self.assertEquals(SoftwareSecurePhotoVerification.display_status(user, window), False)
def test_display(self): user = UserFactory.create() window = MidcourseReverificationWindowFactory() attempt = SoftwareSecurePhotoVerification(user=user, window=window, status="denied") attempt.save() # We expect the verification to be displayed by default self.assertEquals(SoftwareSecurePhotoVerification.display_status(user, window), True) # Turn it off SoftwareSecurePhotoVerification.display_off(user.id) self.assertEquals(SoftwareSecurePhotoVerification.display_status(user, window), False)