'Test certificates exception removal api endpoint returns success status
when called with valid course key and certificate exception id'

def test_certificate_exception_removed_successfully(self):

    GeneratedCertificateFactory.create(user=self.user2, course_id=self.course.id, status=CertificateStatuses.downloadable, grade='1.0')
    response = self.client.post(self.url, data=json.dumps(self.certificate_exception_in_db), content_type='application/json', REQUEST_METHOD='DELETE')
    self.assertEqual(response.status_code, 204)
    with self.assertRaises(ObjectDoesNotExist):
        CertificateWhitelist.objects.get(user=self.user2, course_id=self.course.id)
        GeneratedCertificate.eligible_certificates.get(user=self.user2, course_id=self.course.id, status__not=CertificateStatuses.unavailable)
