diff options
Diffstat (limited to 'tests/tree_test.py')
| -rw-r--r-- | tests/tree_test.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/tree_test.py b/tests/tree_test.py index ebad5e5..e7d23a8 100644 --- a/tests/tree_test.py +++ b/tests/tree_test.py @@ -43,12 +43,15 @@ def add_node(parent, path): def test_context_empty(): commit = MagicMock() commit.hexsha = '123' + commit.tree.path = 'tree/path' page = TreePage('test/tree', 'tree test', commit, '', None, '') context = page.context() assert(context['entries'] == []) + assert(context['content_subdir'] == '') + assert(context['subdir'] == '/123/t/tree/path') assert(context['title'] == 'tree test: Tree') -def test_context_filled(): +def test_context_entries(): tree = MagicMock() tree.trees = [] tree.blobs = [] @@ -65,7 +68,6 @@ def test_context_filled(): page = TreePage('test/tree', 'tree test', commit, '', repo, '') context = page.context() assert(repo.iter_commits.called) - assert(context['title'] == 'tree test: Tree') assert(context['entries'] == [{'name': 'sub/', 'modified': 'Date Time'}, {'name': 'README', 'modified': 'Date Time'}]) def test_traversal(): |