summaryrefslogtreecommitdiffstats
path: root/keystone
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2012-09-28 21:33:32 +0000
committerGerrit Code Review <review@openstack.org>2012-09-28 21:33:32 +0000
commit433edcfbf72602ec4e7bf0ad996cdb2fb31305ba (patch)
treeed55c3b288e2867ec839d5f46e12e382e3957ddc /keystone
parent9a6bf46e955407d561f5a378afb94996c97a83e9 (diff)
parent49487a6ac63ae32b61687d9e8aeb0956590445d7 (diff)
downloadkeystone-433edcfbf72602ec4e7bf0ad996cdb2fb31305ba.tar.gz
keystone-433edcfbf72602ec4e7bf0ad996cdb2fb31305ba.tar.xz
keystone-433edcfbf72602ec4e7bf0ad996cdb2fb31305ba.zip
Merge "Remove run_test.py in favor of stock nose."
Diffstat (limited to 'keystone')
-rw-r--r--keystone/common/sql/util.py5
-rw-r--r--keystone/test.py7
2 files changed, 11 insertions, 1 deletions
diff --git a/keystone/common/sql/util.py b/keystone/common/sql/util.py
index 195adc83..65e87bec 100644
--- a/keystone/common/sql/util.py
+++ b/keystone/common/sql/util.py
@@ -35,3 +35,8 @@ def setup_test_database():
shutil.copyfile('test.db.pristine', 'test.db')
except Exception:
pass
+
+
+def teardown_test_database():
+ if os.path.exists('test.db.pristine'):
+ os.unlink('test.db.pristine')
diff --git a/keystone/test.py b/keystone/test.py
index 44857d7e..519008dc 100644
--- a/keystone/test.py
+++ b/keystone/test.py
@@ -19,6 +19,7 @@ import subprocess
import sys
import time
+import eventlet
import mox
from paste import deploy
import stubout
@@ -32,8 +33,12 @@ from keystone import config
from keystone.openstack.common import importutils
+do_monkeypatch = not os.getenv('STANDARD_THREADS')
+eventlet.patcher.monkey_patch(all=False, socket=True, time=True,
+ thread=do_monkeypatch)
+
LOG = logging.getLogger(__name__)
-ROOTDIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
+ROOTDIR = os.path.dirname(os.path.abspath(os.curdir))
VENDOR = os.path.join(ROOTDIR, 'vendor')
TESTSDIR = os.path.join(ROOTDIR, 'tests')
ETCDIR = os.path.join(ROOTDIR, 'etc')