Remove use of nose attrib plugin and most unittest
Some simple cases that do not use mox still use unittest directly. Replacing unittest.TestCase with HeatTestCase has the added benefit of capturing all logging for reporting during failure. Change-Id: I76192bdb91822055f1e2f7d2e806bf094d399304
This commit is contained in:
@@ -18,11 +18,8 @@ import datetime
|
||||
import copy
|
||||
|
||||
import eventlet
|
||||
import unittest
|
||||
import mox
|
||||
|
||||
from nose.plugins.attrib import attr
|
||||
|
||||
from heat.common import context
|
||||
from heat.common import template_format
|
||||
from heat.engine.resources import autoscaling as asc
|
||||
@@ -32,19 +29,15 @@ from heat.engine import parser
|
||||
from heat.engine import scheduler
|
||||
from heat.engine.resource import Metadata
|
||||
from heat.openstack.common import timeutils
|
||||
from heat.tests.common import HeatTestCase
|
||||
from heat.tests.utils import setup_dummy_db
|
||||
|
||||
|
||||
@attr(tag=['unit', 'resource'])
|
||||
@attr(speed='fast')
|
||||
class AutoScalingTest(unittest.TestCase):
|
||||
class AutoScalingTest(HeatTestCase):
|
||||
def setUp(self):
|
||||
self.m = mox.Mox()
|
||||
super(AutoScalingTest, self).setUp()
|
||||
setup_dummy_db()
|
||||
|
||||
def tearDown(self):
|
||||
self.m.UnsetStubs()
|
||||
|
||||
def load_template(self):
|
||||
self.path = os.path.dirname(os.path.realpath(__file__)).\
|
||||
replace('heat/tests', 'templates')
|
||||
|
||||
Reference in New Issue
Block a user