Tags: New 'UDA' and 'ORPHAN' virtual tags.

This commit is contained in:
Paul Beckingham
2015-07-24 23:46:24 -04:00
parent 297b0c4b04
commit 41a76c6798
8 changed files with 109 additions and 44 deletions

View File

@@ -354,7 +354,6 @@ class TestVirtualTags(TestCase):
self.assertIn("due_eom", out)
self.assertIn("due_eow", out)
def test_virtual_tags_helper(self):
"""Verify '_tags' shows appropriate tags"""
code, out, err = self.t("_tags")
@@ -366,6 +365,36 @@ class TestVirtualTags(TestCase):
self.assertIn("tag", out)
class TestVirtualTagUDA(TestCase):
def setUp(self):
"""Executed before each test in the class"""
self.t = Task()
self.t.config("uda.animal.type", "string")
self.t.config("uda.animal.label", "Animal")
self.t("add one animal:donkey")
self.t("add two")
def test_virtual_tag_UDA(self):
"""Verify 'UDA' appears when expected"""
code, out, err = self.t("+UDA all")
self.assertIn("one", out)
self.assertNotIn("two", out)
class TestVirtualTagORPHAN(TestCase):
def setUp(self):
"""Executed before each test in the class"""
self.t = Task()
self.t("add one rc.uda.animal.type:string rc.uda.animal.label:Animal animal:donkey")
self.t("add two")
def test_virtual_tag_ORPHAN(self):
"""Verify 'ORPHAN' appears when expected"""
code, out, err = self.t("+ORPHAN all")
self.assertIn("one", out)
self.assertNotIn("two", out)
class Test285(TestCase):
@classmethod
def setUpClass(cls):