diff options
author | Matthew Lemon <matt@matthewlemon.com> | 2021-05-18 20:26:07 +0100 |
---|---|---|
committer | Matthew Lemon <matt@matthewlemon.com> | 2021-05-18 20:26:07 +0100 |
commit | 0f21c97f06bccd2260931e7543a24dc618f355b4 (patch) | |
tree | 61ab91a2c9665c2e67b7581652dd2939109266c7 /datamaps/tests/test_api.py | |
parent | 62617d6ef952c24e134b4bc403263ed990a42ec8 (diff) |
fixed test related to getting the correct year from a Month()
Diffstat (limited to 'datamaps/tests/test_api.py')
-rw-r--r-- | datamaps/tests/test_api.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/datamaps/tests/test_api.py b/datamaps/tests/test_api.py index 4c73931..295f1fb 100644 --- a/datamaps/tests/test_api.py +++ b/datamaps/tests/test_api.py @@ -18,6 +18,7 @@ def test_get_project_data_using_month(master): m2 = project_data_from_master_month(master, 8, 2021) m3 = project_data_from_master_month(master, 9, 2021) m4 = project_data_from_master_month(master, 10, 2021) + m5 = project_data_from_master_month(master, 2, 2021) # this is q4 assert m["Chutney Bridge.xlsm"]["Project/Programme Name"] == "Chutney Bridge Ltd" assert isinstance(m.month, Month) assert m.month.name == "July" @@ -32,3 +33,9 @@ def test_get_project_data_using_month(master): assert m2.quarter.end_date == datetime.date(2021, 9, 30) assert m3.quarter.end_date == datetime.date(2021, 9, 30) assert m4.quarter.end_date == datetime.date(2021, 12, 31) + + # year should be different if using this func + assert m.year == 2021 + assert m2.year == 2021 + assert m3.year == 2021 + assert m5.year == 2021 |