Logo
Explore Help
Sign In
darkhelm/notifications-api
1
0
Fork 0
You've already forked notifications-api
mirror of https://github.com/GSA/notifications-api.git synced 2025-12-23 00:41:35 -05:00
Code Issues Packages Projects Releases Wiki Activity
Files
3e0221adecca80d99ec335d62f5b377527a4e06d
notifications-api/tests/app/dao/test_date_utils.py

14 lines
401 B
Python
Raw Normal View History

Created new queries to return the rate with the sum of billable units for the year totals. Once we have the new columns in notifications table, the query will need to include the rate multiplier and if the number is international. The monthly billing query will be built next.
2017-04-26 14:16:47 +01:00
from app.dao.date_util import get_financial_year, get_april_fools
def test_get_financial_year():
start, end = get_financial_year(2000)
assert str(start) == '2000-03-31 23:00:00'
Change get_financial_year to return ending date as 1 microsecond earlier. That way we can write the queries as between start and end dates, making it easier to read. This makes more sense.
2017-05-02 10:00:47 +01:00
assert str(end) == '2001-03-31 22:59:59.999999'
Created new queries to return the rate with the sum of billable units for the year totals. Once we have the new columns in notifications table, the query will need to include the rate multiplier and if the number is international. The monthly billing query will be built next.
2017-04-26 14:16:47 +01:00
def test_get_april_fools():
april_fools = get_april_fools(2016)
assert str(april_fools) == '2016-03-31 23:00:00'
assert april_fools.tzinfo is None
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.25.0 Page: 1799ms Template: 7ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API