From 08b76f65630eb6b5da0bdb2982735761d64118af Mon Sep 17 00:00:00 2001 From: Angus Salkeld Date: Wed, 11 Jun 2014 12:18:36 +1000 Subject: [PATCH] All tests should call the base class setUp() Change-Id: Ib15e0a3a96df690b0bfccb93c05348167619babb --- mistral/tests/base.py | 2 ++ mistral/tests/unit/actions/test_std_email_action.py | 1 + mistral/tests/unit/workbook/test_get_on_state.py | 1 + mistral/tests/unit/workbook/test_workbook.py | 1 + 4 files changed, 5 insertions(+) diff --git a/mistral/tests/base.py b/mistral/tests/base.py index bbea7a0f..231388bc 100644 --- a/mistral/tests/base.py +++ b/mistral/tests/base.py @@ -104,12 +104,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) diff --git a/mistral/tests/unit/actions/test_std_email_action.py b/mistral/tests/unit/actions/test_std_email_action.py index 1279e922..421b2be4 100644 --- a/mistral/tests/unit/actions/test_std_email_action.py +++ b/mistral/tests/unit/actions/test_std_email_action.py @@ -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 с русскими буквами", diff --git a/mistral/tests/unit/workbook/test_get_on_state.py b/mistral/tests/unit/workbook/test_get_on_state.py index ab1f782c..bf621941 100644 --- a/mistral/tests/unit/workbook/test_get_on_state.py +++ b/mistral/tests/unit/workbook/test_get_on_state.py @@ -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): diff --git a/mistral/tests/unit/workbook/test_workbook.py b/mistral/tests/unit/workbook/test_workbook.py index 19db36cc..e15eac3c 100644 --- a/mistral/tests/unit/workbook/test_workbook.py +++ b/mistral/tests/unit/workbook/test_workbook.py @@ -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):