diff options
author | Doug Hellmann <doug.hellmann@dreamhost.com> | 2014-04-02 06:03:01 -0700 |
---|---|---|
committer | Doug Hellmann <doug.hellmann@dreamhost.com> | 2014-04-09 09:28:15 -0700 |
commit | 81af48dfa879ea87a6a5ae5c43edbba5123ecfd6 (patch) | |
tree | 7a80866b64375c2839dade4139018cdfdd0912bc | |
parent | bfe3f7168fe333b04584c979290590a15d72f9bd (diff) | |
download | oslo-incubator-81af48dfa879ea87a6a5ae5c43edbba5123ecfd6.tar.gz |
Fix config-dir for middleware tests
The etc directory from pycadf 0.5 is installed into the virtualenv created
by tox at the top, not inside the library directory. Adjust the location
the audit middleware tests use to find the directory.
Cherry-pick of 530bcd8071dfd9dba3ca08d54b0e8a5900231631
Change-Id: I01268c6294ed8799622300a0db01fc836a2f544f
-rw-r--r-- | tests/unit/middleware/test_audit.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/unit/middleware/test_audit.py b/tests/unit/middleware/test_audit.py index 5559aef6..f8229640 100644 --- a/tests/unit/middleware/test_audit.py +++ b/tests/unit/middleware/test_audit.py @@ -17,10 +17,11 @@ import mock import os +import sys + import webob from oslo.config import cfg -import pycadf from pycadf.audit import api as cadf_api from openstack.common.middleware import audit @@ -66,8 +67,7 @@ class AuditMiddlewareTest(utils.BaseTestCase): def setUp(self): super(AuditMiddlewareTest, self).setUp() - CONF(args=['--config-dir', os.path.abspath(os.path.join( - os.path.dirname(pycadf.__file__), '..', 'etc'))]) + CONF(args=['--config-dir', os.path.join(sys.prefix, 'etc')]) def test_api_request(self): middleware = audit.AuditMiddleware(FakeApp()) |