-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
050684c
commit cdfcb96
Showing
1 changed file
with
11 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,7 +25,6 @@ def setUp(self): | |
self.name = 'Jonathan Smith' | ||
self.profile_name = 'Jon Smith' | ||
self.idv_attempt_id = 1111111 | ||
self.proctoring_attempt_id = 2222222 | ||
self.verified_name_obj = VerifiedName.objects.create( | ||
user=self.user, | ||
verified_name=self.name, | ||
|
@@ -38,7 +37,6 @@ def setUp(self): | |
self.other_name = 'Jonathan Other' | ||
self.other_profile_name = 'Jon Other' | ||
self.other_idv_attempt_id = 1111112 | ||
self.other_proctoring_attempt_id = 2222223 | ||
self.verified_name_obj = VerifiedName.objects.create( | ||
user=self.other_user, | ||
verified_name=self.other_name, | ||
|
@@ -55,3 +53,14 @@ def test_retirement_signal_no_verified_names(self): | |
no_verified_user = User(username='no_verified', email='[email protected]') | ||
_listen_for_lms_retire_verified_names(sender=self.__class__, user=no_verified_user) | ||
self.assertEqual(len(VerifiedName.objects.all()), 2) | ||
|
||
def test_retirement_signal_all_verified_names_for_user(self): | ||
# create a second verified name for user to check that both names are deleted | ||
VerifiedName.objects.create( | ||
user=self.user, | ||
verified_name='J Smith', | ||
profile_name=self.profile_name, | ||
verification_attempt_id=1111112 | ||
) | ||
_listen_for_lms_retire_verified_names(sender=self.__class__, user=self.user) | ||
self.assertEqual(len(VerifiedName.objects.filter(user=self.user)), 0) |