Make all tests inherit from the same base class.
diff --git a/kong/tests/test_flavors.py b/kong/tests/test_flavors.py
index c717530..e5ab762 100644
--- a/kong/tests/test_flavors.py
+++ b/kong/tests/test_flavors.py
@@ -1,19 +1,15 @@
import json
import os
-import unittest2 as unittest
-
from kong import openstack
+from kong import tests
-class FlavorsTest(unittest.TestCase):
-
+class FlavorsTest(tests.FunctionalTest):
def setUp(self):
+ super(FlavorsTest, self).setUp()
self.os = openstack.Manager()
- def tearDown(self):
- pass
-
def _index_flavors(self):
url = '/flavors'
response, body = self.os.nova.request('GET', url)
diff --git a/kong/tests/test_images.py b/kong/tests/test_images.py
index 2b8c19e..2fc0b61 100644
--- a/kong/tests/test_images.py
+++ b/kong/tests/test_images.py
@@ -1,14 +1,14 @@
import json
import os
-import unittest2 as unittest
-
from kong import openstack
+from kong import tests
-class ImagesTest(unittest.TestCase):
+class ImagesTest(tests.FunctionalTest):
def setUp(self):
+ super(ImagesTest, self).setUp()
self.os = openstack.Manager()
host = self.os.config.nova.host
diff --git a/kong/tests/test_server_actions.py b/kong/tests/test_server_actions.py
index 7e58db7..aace609 100644
--- a/kong/tests/test_server_actions.py
+++ b/kong/tests/test_server_actions.py
@@ -4,16 +4,18 @@
from kong import exceptions
from kong import openstack
+from kong import tests
from kong.common import ssh
import unittest2 as unittest
-class ServerActionsTest(unittest.TestCase):
+class ServerActionsTest(tests.FunctionalTest):
multi_node = openstack.Manager().config.env.multi_node
def setUp(self):
+ super(ServerActionsTest, self).setUp()
self.os = openstack.Manager()
self.image_ref = self.os.config.env.image_ref
diff --git a/kong/tests/test_server_addresses.py b/kong/tests/test_server_addresses.py
index cc18974..b76718c 100644
--- a/kong/tests/test_server_addresses.py
+++ b/kong/tests/test_server_addresses.py
@@ -2,16 +2,16 @@
import json
import os
-import unittest2 as unittest
-
-from kong import openstack
from kong import exceptions
+from kong import openstack
+from kong import tests
-class ServerAddressesTest(unittest.TestCase):
+class ServerAddressesTest(tests.FunctionalTest):
@classmethod
def setUpClass(self):
+ super(ServerAddressesTest, self).setUp()
self.os = openstack.Manager()
self.image_ref = self.os.config.env.image_ref
self.flavor_ref = self.os.config.env.flavor_ref
diff --git a/kong/tests/test_server_meta.py b/kong/tests/test_server_meta.py
index 226e0fb..eb870a0 100644
--- a/kong/tests/test_server_meta.py
+++ b/kong/tests/test_server_meta.py
@@ -1,15 +1,14 @@
import json
-import unittest2 as unittest
-
from kong import openstack
+from kong import tests
-class ServersMetadataTest(unittest.TestCase):
-
+class ServersMetadataTest(tests.FunctionalTest):
@classmethod
def setUpClass(self):
+ super(ServersMetadataTest, self).setUp()
self.os = openstack.Manager()
self.image_ref = self.os.config.env.image_ref
self.flavor_ref = self.os.config.env.flavor_ref
diff --git a/kong/tests/test_servers.py b/kong/tests/test_servers.py
index c16b514..f98ab0a 100644
--- a/kong/tests/test_servers.py
+++ b/kong/tests/test_servers.py
@@ -3,17 +3,17 @@
import json
import os
-import unittest2 as unittest
-
from kong import openstack
from kong import exceptions
+from kong import tests
from kong.common import ssh
-class ServersTest(unittest.TestCase):
+class ServersTest(tests.FunctionalTest):
@classmethod
def setUpClass(self):
+ super(ServersTest, self).setUp()
self.os = openstack.Manager()
self.image_ref = self.os.config.env.image_ref
self.flavor_ref = self.os.config.env.flavor_ref