'Test create_xblock to create non persisted xblocks'

def test_temporary_xblocks(self):

    test_course = CourseFactory.create(course='course', run='2014', org='testx', display_name='fun    test    course', user_id='testbot')
    test_chapter = self.store.create_xblock(test_course.system, test_course.id, 'chapter', fields={'display_name': 'chapter    n'}, parent_xblock=test_course)
    self.assertIsInstance(test_chapter, SequenceDescriptor)
    self.assertEqual(test_chapter.display_name, 'chapter    n')
    self.assertIn(test_chapter, test_course.get_children())
    test_def_content = '<problem>boo</problem>'
    test_problem = self.store.create_xblock(test_course.system, test_course.id, 'problem', fields={'data': test_def_content}, parent_xblock=test_chapter)
    self.assertIsInstance(test_problem, CapaDescriptor)
    self.assertEqual(test_problem.data, test_def_content)
    self.assertIn(test_problem, test_chapter.get_children())
    test_problem.display_name = 'test    problem'
    self.assertEqual(test_problem.display_name, 'test    problem')
