def _create_course(test, course_key, course_data):
 course_url = get_url('course_handler', course_key, 'course_key_string')
 response = test.client.ajax_post(course_url, course_data)
 test.assertEqual(response.status_code, 200)
 data = parse_json(response)
 test.assertNotIn('ErrMsg', data)
 test.assertEqual(data['url'], course_url)

def _create_course ( test , course_key , course_data ) : course_url = get_url ( 'course_handler' , course_key , 'course_key_string' ) response = test . client . ajax_post ( course_url , course_data ) test . assertEqual ( response . status_code , 200 ) data = parse_json ( response ) test . assertNotIn ( 'ErrMsg' , data ) test . assertEqual ( data [ 'url' ] , course_url )
creates a course via an ajax request and verifies the url returned in the response .