From 66a9370b7451aa58db28bc0c4d9642f40b844996 Mon Sep 17 00:00:00 2001 From: Matthew Treinish Date: Thu, 28 Aug 2014 18:52:45 -0400 Subject: [PATCH] Move cli asserts to test class This commit moves the cli test specific asserts into the test class. Previously, they were added to the client class as part of the refactor into library. When the test class was added again these methods weren't added back. --- tempest_lib/cli/base.py | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/tempest_lib/cli/base.py b/tempest_lib/cli/base.py index 1e32c06..98c368f 100644 --- a/tempest_lib/cli/base.py +++ b/tempest_lib/cli/base.py @@ -180,17 +180,6 @@ class CLIClientBase(object): return execute(cmd, action, flags, params, fail_ok, merge_stderr, self.cli_dir) - def assertTableStruct(self, items, field_names): - """Verify that all items has keys listed in field_names.""" - for item in items: - for field in field_names: - self.assertIn(field, item) - - def assertFirstLineStartsWith(self, lines, beginning): - self.assertTrue(lines[0].startswith(beginning), - msg=('Beginning of first line has invalid content: %s' - % lines[:3])) - class ClientTestBase(base.BaseTestCase): @@ -201,3 +190,14 @@ class ClientTestBase(base.BaseTestCase): def _get_clients(self): raise NotImplementedError + + def assertTableStruct(self, items, field_names): + """Verify that all items has keys listed in field_names.""" + for item in items: + for field in field_names: + self.assertIn(field, item) + + def assertFirstLineStartsWith(self, lines, beginning): + self.assertTrue(lines[0].startswith(beginning), + msg=('Beginning of first line has invalid content: %s' + % lines[:3]))