Revised the way to import from the datetime package, to avoid name conflict with the common "date" and "time" names.

This commit is contained in:
2023-04-26 13:17:31 +08:00
parent c11ae23885
commit 359c335662
30 changed files with 156 additions and 152 deletions

View File

@@ -17,8 +17,8 @@
"""The test for the reports.
"""
import datetime as dt
import unittest
from datetime import date
import httpx
from flask import Flask
@@ -446,11 +446,11 @@ class ReportTestData(BaseTestData):
"""The report test data."""
def _init_data(self) -> None:
today: date = date.today()
today: dt.date = dt.date.today()
year: int = today.year - 5
month: int = today.month
while True:
j_date: date = date(year, month, 5)
j_date: dt.date = dt.date(year, month, 5)
if j_date > today:
break
self._add_simple_journal_entry(