[patch] added tests for filters and fixed two bugs with filters
|Reported by:||L.Plant.98@…||Owned by:||adrian|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
The patch adds tests for the defaultfilters module, and fixes two bugs discovered while doing the tests:
- a bug in 'slice' with argument '0' (caused by use of the 'a and b or c' shortcut)
- a rounding error in the timesince function (timesince(now - 1 day) came out as '23 hours, 59 minutes')
There remains an issue with the 'timesince' function -- is the 'milliseconds' option meant to be there? It seems strange, since 'seconds' isn't, and it isn't i18nised.
Also, some doc strings have also been updated.