'Test creating a new xblock instance.'

def test_create_item(self):

    course = CourseFactory.create()
    section_data = {'parent_locator': unicode(course.location), 'category': 'chapter', 'display_name': 'Section    One'}
    resp = self.client.ajax_post(reverse_url('xblock_handler'), section_data)
    self.assertEqual(resp.status_code, 200)
    data = parse_json(resp)
    retarget = unicode(course.id.make_usage_key('chapter', 'REPLACE')).replace('REPLACE', '([0-9]|[a-f]){3,}')
    self.assertRegexpMatches(data['locator'], retarget)
