Add Redmine API token authentication
This commit is contained in:
@@ -7,12 +7,12 @@ from redmine_reporter.formatters.console import TableFormatter, CompactFormatter
|
||||
from redmine_reporter.formatters.csv import CSVFormatter
|
||||
from redmine_reporter.formatters.markdown import MarkdownFormatter
|
||||
from redmine_reporter.formatters.odt import ODTFormatter
|
||||
from odf.opendocument import OpenDocument, newdoc
|
||||
from odf.opendocument import OpenDocument, OpenDocumentText
|
||||
|
||||
|
||||
def _make_empty_odt_bytes() -> bytes:
|
||||
"""Создаёт минимальный валидный ODT-документ в памяти."""
|
||||
doc = newdoc(doctype="odt")
|
||||
doc = OpenDocumentText()
|
||||
buf = io.BytesIO()
|
||||
doc.save(buf)
|
||||
return buf.getvalue()
|
||||
@@ -122,7 +122,9 @@ def odt_formatter():
|
||||
)
|
||||
),
|
||||
):
|
||||
yield ODTFormatter(author="Тест Автор", from_date="2026-01-01", to_date="2026-01-31")
|
||||
yield ODTFormatter(
|
||||
author="Тест Автор", from_date="2026-01-01", to_date="2026-01-31"
|
||||
)
|
||||
|
||||
|
||||
# -- Параметризованные тесты текстовых форматтеров --
|
||||
@@ -206,7 +208,9 @@ def test_odt_formatter_save_creates_valid_file(fake_rows, tmp_path):
|
||||
)
|
||||
),
|
||||
):
|
||||
formatter = ODTFormatter(author="Тест", from_date="2026-01-01", to_date="2026-01-31")
|
||||
formatter = ODTFormatter(
|
||||
author="Тест", from_date="2026-01-01", to_date="2026-01-31"
|
||||
)
|
||||
output_file = tmp_path / "report.odt"
|
||||
formatter.save(fake_rows, str(output_file))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user