Skip to content

Commit

Permalink
Remove test dep on name of dir (bug 1124283)
Browse files Browse the repository at this point in the history
The name of the project's directory was previously hardcoded into the
tests, so tests would fail if executed from another directory (such as
"python-keystoneclient-master", as checked-out by keystone for
integration testing).

Also, the tests should now be executable on Windows.

Change-Id: I0a1e052054e509b0f795fd13f95a804e0c255907
  • Loading branch information
dolph committed Mar 4, 2013
1 parent 3ce3fe8 commit 9196be6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion keystoneclient/middleware/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import sys


ROOTDIR = os.path.dirname(os.path.abspath(os.curdir))
ROOTDIR = os.path.abspath(os.curdir)


def rootdir(*p):
Expand Down
8 changes: 3 additions & 5 deletions tests/test_auth_token_middleware.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@
from keystoneclient.middleware import test


CERTDIR = test.rootdir("python-keystoneclient/examples/pki/certs")
KEYDIR = test.rootdir("python-keystoneclient/examples/pki/private")
CMSDIR = test.rootdir("python-keystoneclient/examples/pki/cms")
CERTDIR = test.rootdir('examples', 'pki', 'certs')
KEYDIR = test.rootdir('examples', 'pki', 'private')
CMSDIR = test.rootdir('examples', 'pki', 'cms')
SIGNING_CERT = os.path.join(CERTDIR, 'signing_cert.pem')
SIGNING_KEY = os.path.join(KEYDIR, 'signing_key.pem')
CA = os.path.join(CERTDIR, 'ca.pem')
Expand Down Expand Up @@ -390,8 +390,6 @@ def setUp(self, expected_env=None):
valid_signed_list = 'VALID_SIGNED_REVOCATION_LIST'
globals()[signed_list] = globals()[valid_signed_list]

super(BaseAuthTokenMiddlewareTest, self).setUp()

def tearDown(self):
super(BaseAuthTokenMiddlewareTest, self).tearDown()
try:
Expand Down

0 comments on commit 9196be6

Please sign in to comment.