'Test certificates exception addition api endpoint returns failure when called with
missing username/email.'

def test_certificate_exception_missing_username_and_email_error(self):

    self.certificate_exception.update({'user_name': '', 'user_email': ''})
    response = self.client.post(self.url, data=json.dumps(self.certificate_exception), 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'Student    username/email    field    is    required    and    can    not    be    empty.    Kindly    fill    in    username/email    and    then    press    "Add    to    Exception    List"    button.')
