'Verify the endpoint supports updating a CreditCourse object.'

def test_update(self):

    course_id = u'course-v1:edX+BlendedX+1T2015'
    credit_course = CreditCourse.objects.create(course_key=CourseKey.from_string(course_id), enabled=False)
    self.assertFalse(credit_course.enabled)
    path = reverse(u'credit:creditcourse-detail', args=[course_id])
    data = {u'course_key': course_id, u'enabled': True}
    response = self.client.put(path, json.dumps(data), content_type=JSON)
    self.assertEqual(response.status_code, 200)
    self.assertDictEqual(json.loads(response.content), data)
    credit_course = CreditCourse.objects.get(course_key=credit_course.course_key)
    self.assertTrue(credit_course.enabled)
