'Test that when remove validation fails, the proper HTTP response and
messages are returned.'

@patch('student.models.UserProfile.save')
def test_remove_failure(self, user_profile_save, mock_log):

    user_profile_save.side_effect = [Exception(u'whoops'), None]
    with self.assertRaises(Exception):
        self.client.delete(self.url)
    self.check_images(True)
    self.check_has_profile_image(True)
    self.assertFalse(mock_log.info.called)
    self.assert_no_events_were_emitted()
