TW-1430: Slashes in project names don't work

- Thanks to Richard Boß.
This commit is contained in:
Paul Beckingham 2015-07-13 09:35:31 -04:00
parent 264e318be5
commit 6563911953
2 changed files with 8 additions and 14 deletions

View file

@ -11,6 +11,7 @@
- TW-1285 relative dates combined with times (thanks to Adam Gibbins).
- TW-1389 tw will import same UUID n-times if part of same import (thanks to
Markus Beppler).
- TW-1430 Slashes in project names don't work (thanks to Richard Boß).
- TW-1432 start/stop can be issued on completed tasks (thanks to Renato Alves).
- TW-1440 "task import" from STDIN (thanks to Renato Alves).
- TW-1454 Redundant dependency should not stop modification (thanks to Tomas

View file

@ -36,29 +36,22 @@ sys.path.append(os.path.dirname(os.path.abspath(__file__)))
from basetest import Task, TestCase
class Test1430(TestCase):
class TestBug1430(TestCase):
def setUp(self):
self.t = Task()
def test_project_names_with_dots(self):
"""Check that filtering works for project names with dots"""
pro = "home.garden"
self.t(('add', 'foo', 'project:%s' % pro))
code, out, err = self.t(('list', 'project:%s' % pro))
# We expect a clean exit
self.assertEqual(0, code, "Exit code was non-zero ({0})".format(code))
self.t("add foo project:home.garden")
code, out, err = self.t("_get 1.project")
self.assertEqual("home.garden\n", out)
def test_project_names_with_slashes(self):
"""Check that filtering works for project names with slashes"""
pro = "home/garden"
self.t(('add', 'foo', 'project:%s' % pro))
self.t("add foo project:home/garden")
code, out, err = self.t("_get 1.project")
self.assertEqual("home/garden\n", out)
# TODO Restore this test and fix it.
# The form 'name:a/b' does not work, while 'name.is:a/b' does.
# code, out, err = self.t(('list', 'project:%s' % pro))
code, out, err = self.t(('list', 'project.is:%s' % pro))
# We expect a clean exit
self.assertEqual(0, code, "Exit code was non-zero ({0})".format(code))
if __name__ == "__main__":
from simpletap import TAPTestRunner