move db sync into nosetests package-level fixtures so that the existing nosetests attempt in hudson will pass

This commit is contained in:
Andy Smith
2011-01-18 17:32:54 -08:00
parent 79ed2ff25c
commit a59e28bbd0
2 changed files with 5 additions and 7 deletions

View File

@@ -34,3 +34,8 @@
# The code below enables nosetests to work with i18n _() blocks # The code below enables nosetests to work with i18n _() blocks
import __builtin__ import __builtin__
setattr(__builtin__, '_', lambda x: x) setattr(__builtin__, '_', lambda x: x)
def setup():
from nova.db import migration
migration.db_sync()

View File

@@ -26,10 +26,6 @@ from nose import config
from nose import result from nose import result
from nose import core from nose import core
gettext.install('nova', unicode=1)
from nova.db import migration
class NovaTestResult(result.TextTestResult): class NovaTestResult(result.TextTestResult):
def __init__(self, *args, **kw): def __init__(self, *args, **kw):
@@ -66,9 +62,6 @@ if __name__ == '__main__':
env=os.environ, env=os.environ,
verbosity=3) verbosity=3)
migration.db_sync()
runner = NovaTestRunner(stream=c.stream, runner = NovaTestRunner(stream=c.stream,
verbosity=c.verbosity, verbosity=c.verbosity,
config=c) config=c)