'Test generate certificates exceptions api endpoint returns error
when calling with generate_for without \'new\' or \'all\' value.'

def test_generate_certificate_exceptions_generate_for_incorrect_value(self):

    url = reverse('generate_certificate_exceptions', kwargs={'course_id': unicode(self.course.id), 'generate_for': ''})
    response = self.client.post(url, content_type='application/json')
    self.assertEqual(response.status_code, 400)
    res_json = json.loads(response.content)
    self.assertFalse(res_json['success'])
    self.assertEqual(res_json['message'], u'Invalid    data,    generate_for    must    be    "new"    or    "all".')
