notify-136 change financial year starting in april to calendar year (#278)

Co-authored-by: Kenneth Kehl <@kkehl@flexion.us>
This commit is contained in:
Kenneth Kehl
2023-06-14 13:19:11 -07:00
committed by GitHub
parent e9fccc8493
commit 9f9e0a6ad8
16 changed files with 96 additions and 97 deletions

View File

@@ -1,16 +1,16 @@
from freezegun import freeze_time
from app.dao.date_util import get_current_financial_year_start_year
from app.dao.date_util import get_current_calendar_year_start_year
# see get_financial_year for conversion of financial years.
@freeze_time("2017-03-31 23:59:59.999999")
def test_get_current_financial_year_start_year_before_march():
current_fy = get_current_financial_year_start_year()
assert current_fy == 2016
def test_get_current_calendar_year_start_year_before_march():
current_fy = get_current_calendar_year_start_year()
assert current_fy == 2017
@freeze_time("2017-04-01 04:00:00.000000")
def test_get_current_financial_year_start_year_after_april():
current_fy = get_current_financial_year_start_year()
def test_get_current_calendar_year_start_year_after_april():
current_fy = get_current_calendar_year_start_year()
assert current_fy == 2017