diff options
| author | Hengqing Hu <hudayou@hotmail.com> | 2012-03-08 16:43:32 +0800 |
|---|---|---|
| committer | Hengqing Hu <hudayou@hotmail.com> | 2012-03-17 14:38:29 +0800 |
| commit | 155ef7daab08d7f3fb8f7838df1d715bf1dc2f3f (patch) | |
| tree | 6a581bdffa56295b00165b8ede426eb7bc5cc1f3 /nova/test.py | |
| parent | eb42e7fcd7bb67ab951c9bc6c80a78cd23011458 (diff) | |
Make sqlite in-memory-db usable to unittest
Move migrate monkey patch from nova.tests.test_migrations to
nova.db.sqlalchemy.migration
Change-Id: I018e44903558cad6311fd368787583322f962d0c
Diffstat (limited to 'nova/test.py')
| -rw-r--r-- | nova/test.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/nova/test.py b/nova/test.py index 87e1ce322..e44ad57ea 100644 --- a/nova/test.py +++ b/nova/test.py @@ -40,6 +40,7 @@ from nova.openstack.common import cfg from nova import utils from nova import service from nova.testing.fake import rabbit +from nova.tests import reset_db from nova.virt import fake @@ -129,8 +130,7 @@ class TestCase(unittest.TestCase): # now that we have some required db setup for the system # to work properly. self.start = utils.utcnow() - shutil.copyfile(os.path.join(FLAGS.state_path, FLAGS.sqlite_clean_db), - os.path.join(FLAGS.state_path, FLAGS.sqlite_db)) + reset_db() # emulate some of the mox stuff, we can't use the metaclass # because it screws with our generators |
