'Assert that `response_data` indicates a failed request that returns `expected_error`'

def assertFailedRequest(self, response_data, expected_error):

    self.assertFalse(response_data['success'])
    self.assertEquals(expected_error, response_data['error'])
    self.assertFalse(self.user.email_user.called)
