Merge "All tests should call the base class setUp()"

This commit is contained in:
Jenkins 2014-06-16 05:45:12 +00:00 committed by Gerrit Code Review
commit 6fc45235d1
4 changed files with 5 additions and 0 deletions

View File

@ -98,12 +98,14 @@ class BaseTest(unittest2.TestCase):
class DbTestCase(BaseTest):
def setUp(self):
super(DbTestCase, self).setUp()
self.db_fd, self.db_path = tempfile.mkstemp()
cfg.CONF.set_default('connection', 'sqlite:///' + self.db_path,
group='database')
db_api.setup_db()
def tearDown(self):
super(DbTestCase, self).tearDown()
db_api.drop_db()
os.close(self.db_fd)
os.unlink(self.db_path)

View File

@ -51,6 +51,7 @@ REMOTE_SMTP = False
class SendEmailActionTest(base.BaseTest):
def setUp(self):
super(SendEmailActionTest, self).setUp()
self.params = {
'to': ["dz@example.com, deg@example.com", "xyz@example.com"],
'subject': "Multi word subject с русскими буквами",

View File

@ -28,6 +28,7 @@ from mistral.workbook import tasks
class GetOnStateTest(base.BaseTest):
def setUp(self):
super(GetOnStateTest, self).setUp()
self.task = tasks.TaskSpec(SAMPLE_TASK_SPEC)
def test_state_finish(self):

View File

@ -28,6 +28,7 @@ Workflow:
class DSLModelTest(base.BaseTest):
def setUp(self):
super(DSLModelTest, self).setUp()
self.doc = base.get_resource("test_rest.yaml")
def test_load_dsl(self):