Add assertion for interval count

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
This commit is contained in:
Thomas Lauf 2021-04-10 23:04:20 +02:00
parent 0460656afe
commit a2507be7ea

View file

@ -92,12 +92,12 @@ class TestUndo(TestCase):
self.t("undo")
j = self.t.export()
self.assertEqual(len(j), 2, msg="Expected 2 intervals afterwards, got {}".format(len(j)))
self.assertOpenInterval(j[1],
expectedStart=one_hour_before_utc,
expectedTags=["bar"],
expectedAnnotation="")
def test_undo_cancel(self):
"""Test undo of command 'cancel'"""
one_hour_before_utc = datetime.now().utcnow() - timedelta(hours=1)