Fix issue mock for tests

This commit is contained in:
Кокос Артем Николаевич
2026-01-26 12:37:57 +07:00
parent d839be8776
commit 355849e004
2 changed files with 6 additions and 5 deletions

View File

@@ -4,7 +4,8 @@ from redmine_reporter.utils import get_version
class MockIssue:
def __init__(self, project, subject, status, fixed_version=None):
def __init__(self, project, subject, status, fixed_version=None, issue_id=999):
self.id = issue_id
self.project = project
self.subject = subject
self.status = status
@@ -21,9 +22,9 @@ def test_status_translation():
def test_build_grouped_report():
issues = [
(MockIssue("Камеры", "Фича A", "New", "v2.5.0"), 2.0),
(MockIssue("Камеры", "Баг B", "Resolved", "v2.5.0"), 1.5),
(MockIssue("ПО", "Доки", "Pending", None), 4.0),
(MockIssue("Камеры", "Фича A", "New", "v2.5.0", 101), 2.0),
(MockIssue("Камеры", "Баг B", "Resolved", "v2.5.0", 102), 1.5),
(MockIssue("ПО", "Доки", "Pending", None, 201), 4.0),
]
rows = build_grouped_report(issues)