mirror of https://github.com/snachodog/mybuddy.git
Update tests for feeding frequency changes (#135)
This commit is contained in:
parent
7fda7beabf
commit
4915f809e6
|
@ -240,11 +240,11 @@ def _feeding_statistics(child):
|
|||
"""
|
||||
feedings = [
|
||||
{
|
||||
'start': timezone.now()-timezone.timedelta(days=3),
|
||||
'start': timezone.now() - timezone.timedelta(days=3),
|
||||
'title': _('Feeding frequency (past 3 days)')
|
||||
},
|
||||
{
|
||||
'start': timezone.now()-timezone.timedelta(weeks=2),
|
||||
'start': timezone.now() - timezone.timedelta(weeks=2),
|
||||
'title': _('Feeding frequency (past 2 weeks)')
|
||||
},
|
||||
{
|
||||
|
|
|
@ -88,10 +88,22 @@ class TemplateTagsTestCase(TestCase):
|
|||
'stat': timezone.timedelta(0, 44228, 571429),
|
||||
'type': 'duration'
|
||||
},
|
||||
# Statistics date basis is not particularly strong to these feeding
|
||||
# examples.
|
||||
# TODO: Improve testing of feeding frequency statistics.
|
||||
{
|
||||
'title': 'Feeding frequency',
|
||||
'type': 'duration',
|
||||
'stat': 0.0,
|
||||
'title': 'Feeding frequency (past 3 days)'
|
||||
},
|
||||
{
|
||||
'type': 'duration',
|
||||
'stat': 0.0,
|
||||
'title': 'Feeding frequency (past 2 weeks)'},
|
||||
{
|
||||
'type': 'duration',
|
||||
'stat': timezone.timedelta(0, 7200),
|
||||
'type': 'duration'
|
||||
'title': 'Feeding frequency'
|
||||
},
|
||||
{
|
||||
'title': 'Average nap duration',
|
||||
|
|
Loading…
Reference in New Issue