'Test for deleting a ccx course'

@ddt.data(*AUTH_ATTRS)
def test_delete_detail(self, auth_attr):

    self.assertGreater(CcxFieldOverride.objects.filter(ccx=self.ccx).count(), 0)
    self.assertGreater(CourseEnrollment.objects.filter(course_id=self.ccx_key).count(), 0)
    resp = self.client.delete(self.detail_url, {}, HTTP_AUTHORIZATION=getattr(self, auth_attr))
    self.assertEqual(resp.status_code, status.HTTP_204_NO_CONTENT)
    self.assertIsNone(resp.data)
    with self.assertRaises(CustomCourseForEdX.DoesNotExist):
        CustomCourseForEdX.objects.get(id=self.ccx.id)
    self.assertEqual(CcxFieldOverride.objects.filter(ccx=self.ccx).count(), 0)
    self.assertEqual(CourseEnrollment.objects.filter(course_id=self.ccx_key).count(), 0)
