Make report 'totals.py' truncate intervals to search range

Closes #505

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
This commit is contained in:
Thomas Lauf 2022-10-15 23:49:28 +02:00
parent 6d826cb1d2
commit 49c33591b8
2 changed files with 25 additions and 23 deletions

View file

@ -28,9 +28,8 @@
import datetime
import os
import unittest
import sys
import unittest
# Ensure python finds the local simpletap module
sys.path.append(os.path.dirname(os.path.abspath(__file__)))
@ -356,7 +355,7 @@ class TestTotals(TestCase):
'temp.report.start: {:%Y%m%dT%H%M%S}Z\n'.format(one_hour_before_utc),
'temp.report.end: {:%Y%m%dT%H%M%S}Z\n'.format(now_utc),
'\n',
'[{"start":"20160101T070000Z","end":"20160101T080000Z","tags":[]}]',
'[{{"start":"{:%Y%m%dT%H%M%S}Z","end":"{:%Y%m%dT%H%M%S}Z","tags":[]}}]'.format(one_hour_before_utc, now_utc)
]
out = calculate_totals(input_stream)