aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorGravatar Shirayuki Nekomata <[email protected]>2019-12-13 09:17:21 +0700
committerGravatar Shirayuki Nekomata <[email protected]>2019-12-13 09:17:21 +0700
commitc5109844e45c37bc1cc38eb1c3da31d52ab2aa6d (patch)
treecdac9e91ca6809594801b74e4c557294cbe37d19 /tests
parentMerge branch 'master' into Write-unit-tests-for-`bot/utils/time.py` (diff)
Adding an optional argument for `until_expiration`, update typehints for `format_infraction_with_duration`
- `until_expiration` was being a pain to unittests without a `now` ( default to `datetime.utcnow()` ). Adding an optional argument for this will not only make writing tests easier, but also allow more control over the helper function should we need to calculate the remaining time between two dates in the past. - Changed typehint for `date_from` in `format_infraction_with_duration` to `Optional[datetime.datetime]` to better reflect what it is.
Diffstat (limited to 'tests')
0 files changed, 0 insertions, 0 deletions