More formatting fixes for tests

Signed-off-by: Carlo Costino <carlo.costino@gsa.gov>
This commit is contained in:
Carlo Costino
2023-09-06 18:29:04 -04:00
parent 47695b97d3
commit 95ba7c3099
7 changed files with 41 additions and 35 deletions

View File

@@ -5,7 +5,7 @@ from app.utils.time import get_current_financial_year, is_less_than_days_ago
@pytest.mark.parametrize(
"date_from_db, expected_result",
("date_from_db", "expected_result"),
[
("2019-11-17T11:35:21.726132Z", True),
("2019-11-16T11:35:21.726132Z", False),
@@ -18,13 +18,13 @@ def test_is_less_than_days_ago(date_from_db, expected_result):
@pytest.mark.parametrize(
"datetime_string, financial_year",
(
("datetime_string", "financial_year"),
[
("2021-01-01T00:00:00+00:00", 2020), # Start of 2021
("2021-04-01T03:59:59+00:00", 2020), # One minute before midnight (BST)
("2021-10-01T04:05:00+00:00", 2021), # Midnight (BST)
("2021-12-12T12:12:12+01:00", 2021), # Later in the year
),
],
)
def test_get_financial_year(datetime_string, financial_year):
with freeze_time(datetime_string):