'Verify that we get the error we expect for a given file input.'

def expect_error_on_file_content(self, file_content, error, file_suffix='.csv'):

    self.client.login(username=self.staff_user.username, password='test')
    response = self.call_add_users_to_cohorts(file_content, suffix=file_suffix)
    self.assertEqual(response.status_code, 400)
    result = json.loads(response.content)
    self.assertEqual(result['error'], error)
