Files
notifications-api/tests/app/service/test_utils.py
venusbb 6f7793d761 - Add update dao_update_annual_billing_for_current_and_future_years
- moved get_current_financial_year_start_year from service.utils to dao.date_utils
- Moved logic for data persistence from rest to dao when updating records in db
2017-11-02 12:38:43 +00:00

16 lines
551 B
Python

from app.dao.date_util import get_current_financial_year_start_year
from freezegun import freeze_time
# see get_financial_year for conversion of financial years.
@freeze_time("2017-03-31 22: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
@freeze_time("2017-03-31 23:00:00.000000")
def test_get_current_financial_year_start_year_after_april():
current_fy = get_current_financial_year_start_year()
assert current_fy == 2017