'Test certificates generation api endpoint returns permission denied if
user who made the request is not member of global staff.'

def test_certificate_generation_api_without_global_staff(self):

    user = UserFactory.create()
    self.client.login(username=user.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, 403)
    self.client.login(username=self.instructor.username, password='test')
    response = self.client.post(url)
    self.assertEqual(response.status_code, 403)
