diff options
author | Jenkins <jenkins@review.openstack.org> | 2014-09-16 07:40:54 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2014-09-16 07:40:54 +0000 |
commit | a6685047e1f830be88a850bce05708bd7d471592 (patch) | |
tree | ab18d4f5f5ad0a83e278f31efd697096e66f7f67 | |
parent | 9c2d41a35b29c40b38de3ed25487b6811fa91a37 (diff) | |
parent | e17e81db7e507bcdb530397e6f9f99d792f96eb0 (diff) | |
download | python-neutronclient-a6685047e1f830be88a850bce05708bd7d471592.tar.gz |
Merge "Isolate tests from HTTP_PROXY, OS_REGION_NAME env vars"
-rw-r--r-- | neutronclient/tests/unit/test_auth.py | 4 | ||||
-rw-r--r-- | neutronclient/tests/unit/test_shell.py | 6 |
2 files changed, 9 insertions, 1 deletions
diff --git a/neutronclient/tests/unit/test_auth.py b/neutronclient/tests/unit/test_auth.py index 537236a..42f6745 100644 --- a/neutronclient/tests/unit/test_auth.py +++ b/neutronclient/tests/unit/test_auth.py @@ -17,6 +17,7 @@ import json import uuid +import fixtures import httpretty from mox3 import mox import requests @@ -216,6 +217,9 @@ class CLITestAuthKeystone(testtools.TestCase): super(CLITestAuthKeystone, self).setUp() self.mox = mox.Mox() + for var in ('http_proxy', 'HTTP_PROXY'): + self.useFixture(fixtures.EnvironmentVariableFixture(var)) + self.client = client.construct_http_client( username=USERNAME, tenant_name=TENANT_NAME, diff --git a/neutronclient/tests/unit/test_shell.py b/neutronclient/tests/unit/test_shell.py index 3cf2cd5..499e138 100644 --- a/neutronclient/tests/unit/test_shell.py +++ b/neutronclient/tests/unit/test_shell.py @@ -51,7 +51,11 @@ class ShellTest(testtools.TestCase): 'OS_PASSWORD': DEFAULT_PASSWORD, 'OS_TENANT_ID': DEFAULT_TENANT_ID, 'OS_TENANT_NAME': DEFAULT_TENANT_NAME, - 'OS_AUTH_URL': DEFAULT_AUTH_URL} + 'OS_AUTH_URL': DEFAULT_AUTH_URL, + 'OS_REGION_NAME': None, + 'HTTP_PROXY': None, + 'http_proxy': None, + } # Patch os.environ to avoid required auth info. def setUp(self): |