'Tests the API to get a list of CCX Courses'

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

    resp = self.client.get(self.list_url_master_course, {}, HTTP_AUTHORIZATION=getattr(self, auth_attr))
    self.assertIn('count', resp.data)
    self.assertEqual(resp.data['count'], 0)
    num_ccx = 10
    for _ in xrange(num_ccx):
        self.make_ccx()
    resp = self.client.get(self.list_url_master_course, {}, HTTP_AUTHORIZATION=getattr(self, auth_attr))
    self.assertEqual(resp.status_code, status.HTTP_200_OK)
    self.assertIn('count', resp.data)
    self.assertEqual(resp.data['count'], num_ccx)
    self.assertIn('results', resp.data)
    self.assertEqual(len(resp.data['results']), num_ccx)
