-
Notifications
You must be signed in to change notification settings - Fork 88
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
Showing
2 changed files
with
11 additions
and
14 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 |
---|---|---|
|
@@ -116,7 +116,7 @@ def test_user_registration(self, magic_mock_function): | |
'email2': ['[email protected]'] | ||
}) | ||
self.assertEqual(resp.status_code, 200) | ||
self.assertContains(resp, 'Registration done, activate your account') | ||
self.assertContains(resp, 'feedbackRegistration=1') | ||
self.assertEqual(User.objects.filter(username=username).count(), 1) | ||
self.assertEqual(len(mail.outbox), 1) # An email was sent! | ||
self.assertTrue(settings.EMAIL_SUBJECT_PREFIX in mail.outbox[0].subject) | ||
|
@@ -772,7 +772,7 @@ def test_reset_view_with_email(self): | |
self.client.post(reverse("problems-logging-in"), {"username_or_email": "[email protected]"}) | ||
|
||
self.assertEqual(len(mail.outbox), 1) | ||
self.assertEqual(mail.outbox[0].subject, "Password reset on Freesound") | ||
self.assertEqual(mail.outbox[0].subject, "[freesound] Password reset") | ||
|
||
@override_settings(SITE_ID=2) | ||
def test_reset_view_with_username(self): | ||
|
@@ -782,7 +782,7 @@ def test_reset_view_with_username(self): | |
self.client.post(reverse("problems-logging-in"), {"username_or_email": "testuser"}) | ||
|
||
self.assertEqual(len(mail.outbox), 1) | ||
self.assertEqual(mail.outbox[0].subject, "Password reset on Freesound") | ||
self.assertEqual(mail.outbox[0].subject, "[freesound] Password reset") | ||
|
||
|
||
class EmailResetTestCase(TestCase): | ||
|
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