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

@@ -83,17 +83,15 @@ def test_get_platform_stats_with_real_query(admin_request, notify_db_session):
@pytest.mark.parametrize('start_date, end_date',
[('2019-04-01', '2019-06-30'),
('2019-08-01', '2019-09-30'),
('2019-01-01', '2019-03-31'),
('2019-12-01', '2020-02-28')])
('2019-01-01', '2019-03-31')])
def test_validate_date_range_is_within_a_financial_year(start_date, end_date):
validate_date_range_is_within_a_financial_year(start_date, end_date)
@pytest.mark.parametrize('start_date, end_date',
[('2019-04-01', '2020-06-30'),
('2019-01-01', '2019-04-30'),
('2019-12-01', '2020-04-30'),
('2019-03-31', '2019-04-01')])
('2018-01-01', '2019-04-30'),
('2019-12-01', '2020-04-30')])
def test_validate_date_range_is_within_a_financial_year_raises(start_date, end_date):
with pytest.raises(expected_exception=InvalidRequest) as e:
validate_date_range_is_within_a_financial_year(start_date, end_date)