Tests: fixed date-sensitivity of test

This commit is contained in:
Paul Beckingham 2016-07-01 09:50:31 -04:00
parent 15df8dfff2
commit 106ca0d9cf

View file

@ -67,7 +67,7 @@ class TestStop(TestCase):
def test_stop_all(self): def test_stop_all(self):
"""Start three tags, stop""" """Start three tags, stop"""
self.t("start 20160613T084100 one two three") self.t("start 5mins ago one two three")
code, out, err = self.t("stop") code, out, err = self.t("stop")
self.assertIn("Recorded one three two", out) self.assertIn("Recorded one three two", out)
@ -77,7 +77,7 @@ class TestStop(TestCase):
def test_stop_three(self): def test_stop_three(self):
"""Start three tags, stop three""" """Start three tags, stop three"""
self.t("start 20160613T084100 one two three") self.t("start 5mins ago one two three")
code, out, err = self.t("stop one two three") code, out, err = self.t("stop one two three")
self.assertIn("Recorded one three two", out) self.assertIn("Recorded one three two", out)
@ -87,7 +87,7 @@ class TestStop(TestCase):
def test_stop_two(self): def test_stop_two(self):
"""Start three tags, stop two""" """Start three tags, stop two"""
self.t("start 20160613T084100 one two three") self.t("start 5mins ago one two three")
code, out, err = self.t("stop one three") code, out, err = self.t("stop one three")
self.assertIn("Tracking two", out) self.assertIn("Tracking two", out)
@ -98,7 +98,7 @@ class TestStop(TestCase):
def test_stop_fourth(self): def test_stop_fourth(self):
"""Start three tags, stop fourth""" """Start three tags, stop fourth"""
self.t("start 20160613T084100 one two three") self.t("start 5mins ago one two three")
code, out, err = self.t.runError("stop four") code, out, err = self.t.runError("stop four")
self.assertIn("The current interval does not have the 'four' tag.", err) self.assertIn("The current interval does not have the 'four' tag.", err)