def test_creation(self):
     tree = create_tree('./tests/fixtures/fixture/', 'ROOT')
     expected_tree_structure = {
         'a': {
             '1': {
                 'hello': {},
             },
             '2': {},
         },
         'b': {},
         'c': {},
     }
     self.assert_tree_structure(tree, expected_tree_structure)
    def test_pagination(self):
        tree = create_tree('./tests/fixtures/fixture2/', 'ROOT')
        expected_tree_structure = {
            'blog': {
                'a': {},
                'b': {},
                'c': {},
                'd': {},
                'e': {},
                'f': {},
                'g': {},
            },
        }
        self.assert_tree_structure(tree, expected_tree_structure)

        tree = sort_tree(tree, {'blog': 'alphabetically'})
        tree = paginate_tree(tree, {'blog': 2})
        expected_tree_structure = {
            'blog': {
                'page1': {
                    'a': {},
                    'b': {},
                },
                'page2': {
                    'c': {},
                    'd': {},
                },
                'page3': {
                    'e': {},
                    'f': {},
                },
                'page4': {
                    'g': {},
                },
            },
        }
        self.assert_tree_structure(tree, expected_tree_structure)