Merge "Fix inheritance for BaseTestCase"
diff --git a/requirements.txt b/requirements.txt
index a856d09..1e4c40b 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -20,7 +20,6 @@
 python-ironicclient>=0.2.1
 python-saharaclient>=0.7.5
 python-swiftclient>=2.2.0
-testresources>=0.2.4
 testrepository>=0.0.18
 oslo.config>=1.4.0  # Apache-2.0
 six>=1.7.0
diff --git a/tempest/cli/__init__.py b/tempest/cli/__init__.py
index 8dd2df2..4782129 100644
--- a/tempest/cli/__init__.py
+++ b/tempest/cli/__init__.py
@@ -16,6 +16,7 @@
 import functools
 
 from tempest_lib.cli import base
+from tempest_lib.cli import output_parser
 import testtools
 
 from tempest.common import credentials
@@ -66,7 +67,7 @@
     return decorator
 
 
-class ClientTestBase(base.ClientTestBase, test.BaseTestCase):
+class ClientTestBase(test.BaseTestCase):
     @classmethod
     def resource_setup(cls):
         if not CONF.cli.enabled:
@@ -82,3 +83,36 @@
                                  self.creds.tenant_name,
                                  CONF.identity.uri, CONF.cli.cli_dir)
         return clients
+
+    # TODO(mtreinish): The following code is basically copied from tempest-lib.
+    # The base cli test class in tempest-lib 0.0.1 doesn't work as a mixin like
+    # is needed here. The code below should be removed when tempest-lib
+    # provides a way to provide this functionality
+    def setUp(self):
+        super(ClientTestBase, self).setUp()
+        self.clients = self._get_clients()
+        self.parser = output_parser
+
+    def assertTableStruct(self, items, field_names):
+        """Verify that all items has keys listed in field_names.
+
+        :param items: items to assert are field names in the output table
+        :type items: list
+        :param field_names: field names from the output table of the cmd
+        :type field_names: list
+        """
+        for item in items:
+            for field in field_names:
+                self.assertIn(field, item)
+
+    def assertFirstLineStartsWith(self, lines, beginning):
+        """Verify that the first line starts with a string
+
+        :param lines: strings for each line of output
+        :type lines: list
+        :param beginning: verify this is at the beginning of the first line
+        :type beginning: string
+        """
+        self.assertTrue(lines[0].startswith(beginning),
+                        msg=('Beginning of first line has invalid content: %s'
+                             % lines[:3]))
diff --git a/tempest/test.py b/tempest/test.py
index db8736e..14cf3bb 100644
--- a/tempest/test.py
+++ b/tempest/test.py
@@ -24,7 +24,6 @@
 import uuid
 
 import fixtures
-import testresources
 import testscenarios
 import testtools
 
@@ -222,23 +221,9 @@
 
 atexit.register(validate_tearDownClass)
 
-if sys.version_info >= (2, 7):
-    class BaseDeps(testtools.TestCase,
-                   testtools.testcase.WithAttributes,
-                   testresources.ResourcedTestCase):
-        pass
-else:
-    # Define asserts for py26
-    import unittest2
 
-    class BaseDeps(testtools.TestCase,
-                   testtools.testcase.WithAttributes,
-                   testresources.ResourcedTestCase,
-                   unittest2.TestCase):
-        pass
-
-
-class BaseTestCase(BaseDeps):
+class BaseTestCase(testtools.testcase.WithAttributes,
+                   testtools.TestCase):
 
     setUpClassCalled = False
     _service = None