Test: Merged tw-1468.t into filter.t

This commit is contained in:
Paul Beckingham
2015-10-25 10:38:21 -04:00
parent 5daf8d3101
commit b525fef67d
2 changed files with 21 additions and 63 deletions

View File

@@ -905,6 +905,27 @@ class TestBug1456(TestCase):
self.assertIn("two", out)
class Test1468(TestCase):
def setUp(self):
self.t = Task()
self.t('add project:home buy milk')
self.t('add project:home mow the lawn')
def test_single_attribute_filter(self):
"""1468: Single attribute filter (project:home)"""
code, out, err = self.t('list project:home')
self.assertEqual(0, code, "Exit code was non-zero ({0})".format(code))
self.assertIn('buy milk', out)
self.assertIn('mow the lawn', out)
def test_attribute_and_search_filter(self):
"""1468: Attribute and implicit search filter (project:home /lawn/)"""
code, out, err = self.t('list project:home /lawn/')
self.assertEqual(0, code, "Exit code was non-zero ({0})".format(code))
self.assertNotIn('buy milk', out)
self.assertIn('mow the lawn', out)
if __name__ == "__main__":
from simpletap import TAPTestRunner
unittest.main(testRunner=TAPTestRunner())