Use nova.test.TestCase as the base test class.

Subclass nova.test.TestCase instead of unittest.TestCase so that all
tests get the proper setUp and tearDown needed for all tests.

Part of blueprint grizzly-testtools

Change-Id: I8f3cd49e6e0e36eade1fd6ccb6c15359d38f2236
This commit is contained in:
Clark Boylan
2012-12-12 10:02:40 -08:00
parent 722286c19d
commit 3625bd708c

View File

@@ -2,12 +2,12 @@ import mox
from nova import context
from nova import db
from nova import exception
from nova import test
from nova.tests.xenapi import stubs
from nova.virt.xenapi import driver as xenapi_conn
from nova.virt.xenapi import fake
from nova.virt.xenapi import vm_utils
from nova.virt.xenapi import volume_utils
import unittest
class GetInstanceForVdisForSrTestCase(stubs.XenAPITestBase):
@@ -87,7 +87,7 @@ class GetInstanceForVdisForSrTestCase(stubs.XenAPITestBase):
driver._session, dev_params)
class VMRefOrRaiseVMFoundTestCase(unittest.TestCase):
class VMRefOrRaiseVMFoundTestCase(test.TestCase):
def test_lookup_call(self):
mock = mox.Mox()
@@ -111,7 +111,7 @@ class VMRefOrRaiseVMFoundTestCase(unittest.TestCase):
mock.VerifyAll()
class VMRefOrRaiseVMNotFoundTestCase(unittest.TestCase):
class VMRefOrRaiseVMNotFoundTestCase(test.TestCase):
def test_exception_raised(self):
mock = mox.Mox()