From 9348e5a509c91707210b5e3cee14e812c7d8160a Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Wed, 5 Aug 2015 17:07:17 -0400 Subject: [PATCH] Test: Improved tw-1630 tests --- test/tw-1630.t | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/test/tw-1630.t b/test/tw-1630.t index 87827d77f..d51f9fe23 100755 --- a/test/tw-1630.t +++ b/test/tw-1630.t @@ -39,12 +39,23 @@ class TestBug1630(TestCase): def setUp(self): """Executed before each test in the class""" self.t = Task() + self.t("add zero") + self.t("add one due:7d") + self.t("add two due:10d") def test_attribute_modifier_with_duration(self): """Verify that 'due.before:10d' is correctly interpreted""" - self.t("add one due:7d") - code, out, err = self.t("due.before:10d list") - self.tap(out) + code, out, err = self.t("due.before:10d list rc.verbose:nothing") + self.assertNotIn("zero", out) + self.assertIn("one", out) + self.assertNotIn("two", out) + + def test_attribute_no_modifier_with_duration(self): + """Verify that 'due:7d' is correctly interpreted""" + code, out, err = self.t("due:7d list rc.verbose:nothing") + self.assertNotIn("zero", out) + self.assertIn("one", out) + self.assertNotIn("two", out) if __name__ == "__main__":