Mgmt command to cancel user retirement request.

This commit is contained in:
John Eskew
2018-07-30 16:32:54 -04:00
parent 9ad65031a0
commit f92a8f6e24
9 changed files with 228 additions and 122 deletions

View File

@@ -2,7 +2,7 @@
Test signal handlers for the survey app
"""
from openedx.core.djangoapps.user_api.accounts.tests.retirement_helpers import fake_retirement
from openedx.core.djangoapps.user_api.accounts.tests.retirement_helpers import fake_completed_retirement
from student.tests.factories import UserFactory
from survey.models import SurveyAnswer
from survey.tests.factories import SurveyAnswerFactory
@@ -43,7 +43,7 @@ class SurveyRetireSignalTests(ModuleStoreTestCase):
# Run twice to make sure no errors are raised
_listen_for_lms_retire(sender=self.__class__, user=answer.user)
fake_retirement(answer.user)
fake_completed_retirement(answer.user)
_listen_for_lms_retire(sender=self.__class__, user=answer.user)
# All values for this user should still be here and just be an empty string

View File

@@ -9,7 +9,7 @@ from pytz import UTC
from lms.djangoapps.verify_student.models import SoftwareSecurePhotoVerification, VerificationDeadline
from lms.djangoapps.verify_student.signals import _listen_for_course_publish, _listen_for_lms_retire
from lms.djangoapps.verify_student.tests.factories import SoftwareSecurePhotoVerificationFactory
from openedx.core.djangoapps.user_api.accounts.tests.retirement_helpers import fake_retirement
from openedx.core.djangoapps.user_api.accounts.tests.retirement_helpers import fake_completed_retirement
from student.tests.factories import UserFactory
from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase
from xmodule.modulestore.tests.factories import CourseFactory
@@ -95,7 +95,7 @@ class RetirementSignalTest(ModuleStoreTestCase):
# Run this twice to make sure there are no errors raised 2nd time through
_listen_for_lms_retire(sender=self.__class__, user=verification.user)
fake_retirement(verification.user)
fake_completed_retirement(verification.user)
_listen_for_lms_retire(sender=self.__class__, user=verification.user)
ver_obj = SoftwareSecurePhotoVerification.objects.get(user=verification.user)