From 5090a7d730513e9acbbade9fe0bdfc04c7bd227c Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Fri, 17 Jul 2015 21:08:05 -0400 Subject: [PATCH] Test: Added _aliases command test --- test/alias.t | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/test/alias.t b/test/alias.t index 85bd21ec6..34c9fdb42 100755 --- a/test/alias.t +++ b/test/alias.t @@ -38,8 +38,6 @@ from basetest import Task, TestCase class TestAlias(TestCase): def setUp(self): """Executed before each test in the class""" - # Used to initialize objects that should be re-initialized or - # re-created for each individual test self.t = Task() def test_simple_alias_to_project(self): @@ -133,6 +131,18 @@ class TestAlias(TestCase): msg="task hometoday -> project:Home and due:today minimal > " "Work task") +class TestAliasesCommand(TestCase): + def setUp(self): + """Executed before each test in the class""" + self.t = Task() + + def test_aliases_helper(self): + """Verify that aliases are listed by the _aliases command""" + self.t.config("alias.foo", "bar") + code, out, err = self.t("_aliases") + self.assertIn("foo", out) + + if __name__ == "__main__": from simpletap import TAPTestRunner unittest.main(testRunner=TAPTestRunner())