'Test certificates generation api endpoint returns success status when called with
valid course key'

def test_certificate_generation_api_with_global_staff(self):

    self.client.login(username=self.global_staff.username, password='test')
    url = reverse('start_certificate_generation', kwargs={'course_id': unicode(self.course.id)})
    response = self.client.post(url)
    self.assertEqual(response.status_code, 200)
    res_json = json.loads(response.content)
    self.assertIsNotNone(res_json['message'])
    self.assertIsNotNone(res_json['task_id'])
