fix: handle save_period_to_config errors, remove duplicate _MockIssue
- cli.py: wrap save_period_to_config in try/except to avoid unhandled traceback on disk full / permission denial (I2) - test_cli.py: remove duplicate _MockIssue class definition (I3)
This commit is contained in:
@@ -159,17 +159,6 @@ def test_cli_verbose_and_debug_flags_accepted(mock_fetch):
|
||||
assert code == 0
|
||||
|
||||
|
||||
class _MockIssue:
|
||||
"""Простой mock Redmine Issue для CLI-тестов."""
|
||||
|
||||
def __init__(self, issue_id=1, subject="Task", project="Project", status="New"):
|
||||
self.id = issue_id
|
||||
self.subject = subject
|
||||
self.project = project
|
||||
self.status = status
|
||||
self.fixed_version = None
|
||||
|
||||
|
||||
@mock.patch.dict(os.environ, {}, clear=True)
|
||||
@mock.patch("redmine_reporter.cli.fetch_issues_with_spent_time")
|
||||
def test_cli_url_and_api_key_override_env(mock_fetch):
|
||||
|
||||
Reference in New Issue
Block a user