mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
Update TestUUIDFormats to match TestUDAUUIDFormats
This commit is contained in:
parent
694256d5e2
commit
cc635386cc
1 changed files with 6 additions and 9 deletions
|
@ -109,29 +109,26 @@ class TestUUIDFormats(TestCase):
|
|||
def setUpClass(cls):
|
||||
"""Executed once before any test in the class"""
|
||||
cls.t = Task()
|
||||
cls.t.config("report.xxx.columns", "id,uuid")
|
||||
cls.t.config("report.xxx.columns", "uuid")
|
||||
cls.t.config("verbose", "nothing")
|
||||
|
||||
cls.t("add zero")
|
||||
code, out, err = cls.t("_get 1.uuid")
|
||||
cls.uuid = out.strip()
|
||||
|
||||
def setUp(self):
|
||||
"""Executed before each test in the class"""
|
||||
|
||||
def test_uuid_long(self):
|
||||
"""Verify formatting of 'uuid.long' column"""
|
||||
code, out, err = self.t("xxx rc.report.xxx.columns:id,uuid.long")
|
||||
self.assertIn(self.uuid, out)
|
||||
code, out, err = self.t("xxx rc.report.xxx.columns:uuid.long")
|
||||
self.assertEqual(self.uuid, out.strip())
|
||||
|
||||
def test_uuid_short(self):
|
||||
"""Verify formatting of 'uuid.short' column"""
|
||||
code, out, err = self.t("xxx rc.report.xxx.columns:id,uuid.short")
|
||||
self.assertIn(self.uuid[:7], out)
|
||||
code, out, err = self.t("xxx rc.report.xxx.columns:uuid.short")
|
||||
self.assertEqual(self.uuid[:8], out.strip())
|
||||
|
||||
def test_uuid_format_unrecognized(self):
|
||||
"""Verify uuid.donkey formatting fails"""
|
||||
code, out, err = self.t.runError("xxx rc.report.xxx.columns:id,uuid.donkey")
|
||||
code, out, err = self.t.runError("xxx rc.report.xxx.columns:uuid.donkey")
|
||||
self.assertEqual(err, "Unrecognized column format 'uuid.donkey'\n")
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue