From 11a0dc72900d1b43fbd836cb93b5835703ad2502 Mon Sep 17 00:00:00 2001 From: Tomas Babej Date: Thu, 6 Aug 2015 05:03:49 +0200 Subject: [PATCH] tests: Expand tests for querying by UUIDS with short forms --- test/uuid.t | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/test/uuid.t b/test/uuid.t index 8b1f3ddb4..a0ebe5a2a 100755 --- a/test/uuid.t +++ b/test/uuid.t @@ -140,6 +140,17 @@ class TestUUID(TestCase): code, out, err = self.t("12345678-1234-1234-1234-123456789012 export") self.assertIn('"description":"six"', out) + def test_numerical_short_uuid(self): + """Using numerical UUID in the short form""" + # NOTE: Reported on TW-1636 + self.t("12345678 modify status:pending") + + code, out, err = self.t("_get 12345678.status") + self.assertIn("pending\n", out) + + code, out, err = self.t("12345678 export") + self.assertIn('"description":"six"', out) + def test_alpha_uuid(self): """Using alphabetic UUID""" # NOTE: complement numerical only reported on TW-1636 @@ -151,6 +162,17 @@ class TestUUID(TestCase): code, out, err = self.t("abcdefab-abcd-abcd-abcd-abcdefabcdef export") self.assertIn('"description":"seven"', out) + def test_alpha_short_uuid(self): + """Using alphabetic UUID in the short form""" + # NOTE: complement numerical only reported on TW-1636 + self.t("abcdefab modify status:pending") + + code, out, err = self.t("_get abcdefab.status") + self.assertIn("pending\n", out) + + code, out, err = self.t("abcdefab export") + self.assertIn('"description":"seven"', out) + class TestUUIDuplicates(TestCase): def setUp(self):