mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
Test: Added _aliases command test
This commit is contained in:
parent
bf0b074f45
commit
5090a7d730
1 changed files with 12 additions and 2 deletions
14
test/alias.t
14
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())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue