Refactor student login for readability and fix Django 1.11 issues
This commit is contained in:
@@ -322,7 +322,7 @@ class ShibSPTest(CacheIsolationTestCase):
|
||||
'terms_of_service': u'true',
|
||||
'honor_code': u'true'}
|
||||
|
||||
with patch('student.views.AUDIT_LOG') as mock_audit_log:
|
||||
with patch('student.views.management.AUDIT_LOG') as mock_audit_log:
|
||||
self.client.post('/create_account', data=postvars)
|
||||
|
||||
mail = identity.get('mail')
|
||||
|
||||
@@ -200,7 +200,7 @@ class TestAccountApi(UserSettingsEventTestMixin, TestCase):
|
||||
self.assertIn("Full Name cannot contain the following characters: < >", field_errors["name"]["user_message"])
|
||||
|
||||
@patch('django.core.mail.send_mail')
|
||||
@patch('student.views.render_to_string', Mock(side_effect=mock_render_to_string, autospec=True))
|
||||
@patch('student.views.management.render_to_string', Mock(side_effect=mock_render_to_string, autospec=True))
|
||||
def test_update_sending_email_fails(self, send_mail):
|
||||
"""Test what happens if all validation checks pass, but sending the email for email change fails."""
|
||||
send_mail.side_effect = [Exception, None]
|
||||
|
||||
Reference in New Issue
Block a user