From becc561e6159d28c169d3c1b0f77a2d765b76659 Mon Sep 17 00:00:00 2001 From: Yuki Nishiwaki Date: Sun, 20 Sep 2015 13:08:59 +0900 Subject: [PATCH] Add test perttern for cliutils.make_table_header cliutils.make_table_header method have funtionality to check whether table label is longer than table_width. This patch add the test for it. Change-Id: I3b5e01707b8c51d3bb0141bb16495fd6e118fe67 --- tests/unit/cli/test_cliutils.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/unit/cli/test_cliutils.py b/tests/unit/cli/test_cliutils.py index 2619b63ab6..3445529c0e 100644 --- a/tests/unit/cli/test_cliutils.py +++ b/tests/unit/cli/test_cliutils.py @@ -88,6 +88,9 @@ class CliUtilsTestCase(test.TestCase): ) self.assertEqual(expected, actual) + self.assertRaises(ValueError, cliutils.make_table_header, + "Response Times (sec)", len("Response Times (sec)")) + def test_pretty_float_formatter_rounding(self): test_table_rows = {"test_header": 6.56565} self.__dict__.update(**test_table_rows)