]> review.fuel-infra Code Review - openstack-build/heat-build.git/commitdiff
Fix test_dbinstance not running by itself
authorClint Byrum <clint@fewbar.com>
Wed, 1 May 2013 23:19:25 +0000 (16:19 -0700)
committerClint Byrum <clint@fewbar.com>
Wed, 1 May 2013 23:19:25 +0000 (16:19 -0700)
This test seems to need a clean copy of the db like many others. Call
setup_dummy_db to initialize so it runs reliably by itself.

Change-Id: I60fcd6b5c94659f16ef85ca3bdbd61417c59322b

heat/tests/test_dbinstance.py

index 2d815fbcf34e2e7fbb9dcdc5cb258709d0c20cf5..3b5141bbf5e8bbee87777a8acf4a2e65f0457139 100644 (file)
@@ -24,11 +24,13 @@ from heat.engine import parser
 from heat.engine import scheduler
 from heat.engine.resources import dbinstance as dbi
 from heat.tests.common import HeatTestCase
+from heat.tests.utils import setup_dummy_db
 
 
 class DBInstanceTest(HeatTestCase):
     def setUp(self):
         super(DBInstanceTest, self).setUp()
+        setup_dummy_db()
         self.m.StubOutWithMock(dbi.DBInstance, 'create_with_template')
         self.m.StubOutWithMock(dbi.DBInstance, 'nested')