'User will be banned'

@patch('readthedocs.projects.views.private.ProjectBasicsForm.clean')
def test_profile_middleware_spam(self, form):

    form.side_effect = ProjectSpamError
    req = self.request('/projects/import', method='post', data=self.data)
    req.user = get(User)
    resp = ImportWizardView.as_view()(req)
    self.assertEqual(resp.status_code, 302)
    self.assertEqual(resp['location'], '/')
    self.assertTrue(req.user.profile.banned)
