summaryrefslogtreecommitdiffstats
path: root/tests/log_test.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/log_test.py')
-rw-r--r--tests/log_test.py26
1 files changed, 13 insertions, 13 deletions
diff --git a/tests/log_test.py b/tests/log_test.py
index 1efe3bd..c0619de 100644
--- a/tests/log_test.py
+++ b/tests/log_test.py
@@ -2,13 +2,13 @@ from g2h.log_page import LogPage
from unittest.mock import MagicMock
def test_init():
- page = LogPage('test/log', 'log test', None, None, None)
+ page = LogPage('test/log', 'log test', None, None, None, '')
assert(page.name == 'log test')
assert(page.out_file_path == 'test/log/l.md')
assert(page.template.name == 'log.md')
def test_context_no_commits():
- page = LogPage('test/log', 'log test', None, None, None)
+ page = LogPage('test/log', 'log test', None, None, None, '')
context = page.context()
assert(context['title'] == 'log test: Log')
assert(context['commits'] == [])
@@ -18,7 +18,7 @@ def test_context_no_branches_and_tags():
commit.summary = 'mock commit'
commit.hexsha = 1234;
commit.committed_datetime = 0
- page = LogPage('test/log', 'log test', [commit], None, None)
+ page = LogPage('test/log', 'log test', [commit], None, None, '')
context = page.context()
assert(context['title'] == 'log test: Log')
assert(context['commits'] == [{'committed_datetime': 0, 'refs': [], 'summary': 'mock commit'}])
@@ -31,7 +31,7 @@ def test_context_matching_branch_no_tags():
branch = MagicMock()
branch.commit.hexsha = commit.hexsha
branch.name = 'mock branch'
- page = LogPage('test/log', 'log test', [commit], [branch], None)
+ page = LogPage('test/log', 'log test', [commit], [branch], None, '')
context = page.context()
assert(context['title'] == 'log test: Log')
assert(context['commits'] == [{'committed_datetime': 0, 'refs': ['mock branch'], 'summary': 'mock commit'}])
@@ -44,7 +44,7 @@ def test_context_unmatching_branch_no_tags():
branch = MagicMock()
branch.commit.hexsha = 4321
branch.name = 'mock branch'
- page = LogPage('test/log', 'log test', [commit], [branch], None)
+ page = LogPage('test/log', 'log test', [commit], [branch], None, '')
context = page.context()
assert(context['title'] == 'log test: Log')
assert(context['commits'] == [{'committed_datetime': 0, 'refs': [], 'summary': 'mock commit'}])
@@ -57,7 +57,7 @@ def test_context_no_branch_matching_tag():
tag = MagicMock()
tag.commit.hexsha = commit.hexsha
tag.name = 'mock tag'
- page = LogPage('test/log', 'log test', [commit], None, [tag])
+ page = LogPage('test/log', 'log test', [commit], None, [tag], '')
context = page.context()
assert(context['title'] == 'log test: Log')
assert(context['commits'] == [{'committed_datetime': 0, 'refs': ['mock tag'], 'summary': 'mock commit'}])
@@ -70,7 +70,7 @@ def test_context_no_branch_no_matching_tag():
tag = MagicMock()
tag.commit.hexsha = 4321
tag.name = 'mock tag'
- page = LogPage('test/log', 'log test', [commit], None, [tag])
+ page = LogPage('test/log', 'log test', [commit], None, [tag], '')
context = page.context()
assert(context['title'] == 'log test: Log')
assert(context['commits'] == [{'committed_datetime': 0, 'refs': [], 'summary': 'mock commit'}])
@@ -86,7 +86,7 @@ def test_context_no_matching_branch_no_matching_tag():
tag = MagicMock()
tag.commit.hexsha = 4321
tag.name = 'mock tag'
- page = LogPage('test/log', 'log test', [commit], [branch], [tag])
+ page = LogPage('test/log', 'log test', [commit], [branch], [tag], '')
context = page.context()
assert(context['title'] == 'log test: Log')
assert(context['commits'] == [{'committed_datetime': 0, 'refs': [], 'summary': 'mock commit'}])
@@ -102,7 +102,7 @@ def test_context_matching_branch_matching_tag():
tag = MagicMock()
tag.commit.hexsha = commit.hexsha
tag.name = 'mock tag'
- page = LogPage('test/log', 'log test', [commit], [branch], [tag])
+ page = LogPage('test/log', 'log test', [commit], [branch], [tag], '')
context = page.context()
assert(context['title'] == 'log test: Log')
assert(context['commits'] == [{'committed_datetime': 0, 'refs': ['mock branch', 'mock tag'], 'summary': 'mock commit'}])
@@ -116,7 +116,7 @@ def test_multiple_commits():
commit2.summary = 'mock commit 2'
commit2.hexsha = 2;
commit2.committed_datetime = 1
- page = LogPage('test/log', 'log test', [commit1, commit2], None, None)
+ page = LogPage('test/log', 'log test', [commit1, commit2], None, None, '')
context = page.context()
assert(context['title'] == 'log test: Log')
assert(context['commits'] == [
@@ -136,7 +136,7 @@ def test_multiple_commits_branch():
branch = MagicMock()
branch.commit.hexsha = 1
branch.name = 'mock branch'
- page = LogPage('test/log', 'log test', [commit1, commit2], [branch], None)
+ page = LogPage('test/log', 'log test', [commit1, commit2], [branch], None, '')
context = page.context()
assert(context['title'] == 'log test: Log')
assert(context['commits'] == [
@@ -156,7 +156,7 @@ def test_multiple_commits_tag():
tag = MagicMock()
tag.commit.hexsha = 1
tag.name = 'mock tag'
- page = LogPage('test/log', 'log test', [commit1, commit2], None, [tag])
+ page = LogPage('test/log', 'log test', [commit1, commit2], None, [tag], '')
context = page.context()
assert(context['title'] == 'log test: Log')
assert(context['commits'] == [
@@ -179,7 +179,7 @@ def test_multiple_commits_branch_and_tag():
tag = MagicMock()
tag.commit.hexsha = 2
tag.name = 'mock tag'
- page = LogPage('test/log', 'log test', [commit1, commit2], [branch], [tag])
+ page = LogPage('test/log', 'log test', [commit1, commit2], [branch], [tag], '')
context = page.context()
assert(context['title'] == 'log test: Log')
assert(context['commits'] == [