'Verify a course can be created by the view.'

def assert_can_create_course(self, **request_kwargs):

    course = CourseFactory.create()
    expected_modes = [CourseMode(mode_slug=u'verified', min_price=150, currency=u'USD', sku=u'ABC123', bulk_sku=u'BULK-ABC123'), CourseMode(mode_slug=u'honor', min_price=0, currency=u'USD', sku=u'DEADBEEF', bulk_sku=u'BULK-DEADBEEF')]
    expected = self._serialize_course(course, expected_modes)
    path = reverse('commerce_api:v1:courses:retrieve_update', args=[unicode(course.id)])
    response = self.client.put(path, json.dumps(expected), content_type=JSON_CONTENT_TYPE, **request_kwargs)
    self.assertEqual(response.status_code, 201)
    actual = json.loads(response.content)
    self.assertEqual(actual, expected)
    course_modes = CourseMode.objects.filter(course_id=course.id)
    actual = [course_mode.mode_display_name for course_mode in course_modes]
    self.assertListEqual(actual, ['Verified    Certificate', 'Honor    Certificate'])
