def __init__(self): hierarchy = HierarchyFactory(name='main', base_url='/pages/') root = hierarchy.get_root() root.add_child_section_from_dict({ 'label': 'Welcome to the Intro Page', 'slug': 'intro', 'children': [ { 'label': 'Step 1', 'slug': 'step-1', 'pageblocks': [{ 'block_type': 'Text Block' }] }, { 'label': 'Step 2', 'slug': 'step-2', 'pageblocks': [{ 'block_type': 'My Block Name' }] }, ] }) self.root = root
def setUp(self): self.user = User.objects.create(username="******") hierarchy = HierarchyFactory() hierarchy.get_root().add_child_section_from_dict({ 'label': 'Page One', 'slug': 'page-one', 'pageblocks': [ { 'label': 'pretest page one', 'css_extra': 'foo', 'block_type': 'Quiz', 'rhetorical': False, 'description': 'the first quiz', 'questions': [] }, ], 'children': [], }) hierarchy.get_root().add_child_section_from_dict({ 'label': 'Page Two', 'slug': 'page-two', 'pageblocks': [ { 'label': 'pretest page two', 'css_extra': 'foo', 'block_type': 'Quiz', 'rhetorical': False, 'description': 'the second quiz', 'questions': [] }, ], 'children': [], }) hierarchy.get_root().add_child_section_from_dict({ 'label': 'Page Three', 'slug': 'page-three', 'pageblocks': [ { 'label': 'pretest page three', 'css_extra': 'bar', 'block_type': 'Quiz', 'rhetorical': False, 'description': 'the third quiz', 'questions': [] }, ], 'children': [], })
def setUp(self): self.user = User.objects.create(username="******") hierarchy = HierarchyFactory() hierarchy.get_root().add_child_section_from_dict({ 'label': 'Page One', 'slug': 'page-one', 'pageblocks': [{ 'label': 'pretest page one', 'css_extra': 'foo', 'block_type': 'Quiz', 'rhetorical': False, 'description': 'the first quiz', 'questions': []}, ], 'children': [], }) hierarchy.get_root().add_child_section_from_dict({ 'label': 'Page Two', 'slug': 'page-two', 'pageblocks': [{ 'label': 'pretest page two', 'css_extra': 'foo', 'block_type': 'Quiz', 'rhetorical': False, 'description': 'the second quiz', 'questions': []}, ], 'children': [], }) hierarchy.get_root().add_child_section_from_dict({ 'label': 'Page Three', 'slug': 'page-three', 'pageblocks': [{ 'label': 'pretest page three', 'css_extra': 'bar', 'block_type': 'Quiz', 'rhetorical': False, 'description': 'the third quiz', 'questions': []}, ], 'children': [], })