diff options
author | Robert Collins <robertc@robertcollins.net> | 2012-11-14 06:18:49 +0000 |
---|---|---|
committer | Robert Collins <robertc@robertcollins.net> | 2012-11-14 07:03:25 +0000 |
commit | 18b9c7f29b8925aadeb6ac1ea95c1e1d74e9fa50 (patch) | |
tree | ea26b294b69f50a3e913d8cbb990b5279b6b9af9 | |
parent | 6375ca7eb56b13bb4794b843a5eaef8118f0dff6 (diff) | |
download | nova-18b9c7f29b8925aadeb6ac1ea95c1e1d74e9fa50.tar.gz nova-18b9c7f29b8925aadeb6ac1ea95c1e1d74e9fa50.tar.xz nova-18b9c7f29b8925aadeb6ac1ea95c1e1d74e9fa50.zip |
Isolate tests from the environment variable http_proxy.
This fixes bug 1078548.
This is done by adding a dependency on the fixtures library, which has
dedicated code for just this sort of thing, and using it in the base class.
Change-Id: I841fbf912b1a3ab43ca8c52c779d930aaf4a0e96
-rw-r--r-- | nova/test.py | 2 | ||||
-rw-r--r-- | tools/test-requires | 1 |
2 files changed, 3 insertions, 0 deletions
diff --git a/nova/test.py b/nova/test.py index 73956a35c..d8a8ea082 100644 --- a/nova/test.py +++ b/nova/test.py @@ -26,6 +26,7 @@ inline callbacks. import sys import uuid +from fixtures import EnvironmentVariable import mox import stubout import testtools @@ -82,6 +83,7 @@ class TestCase(testtools.TestCase): self.injected = [] self._services = [] self._modules = {} + self.useFixture(EnvironmentVariable('http_proxy')) def tearDown(self): """Runs after each test method to tear down test environment.""" diff --git a/tools/test-requires b/tools/test-requires index fc56d3c87..b3d4b5a22 100644 --- a/tools/test-requires +++ b/tools/test-requires @@ -2,6 +2,7 @@ distribute>=0.6.24 coverage +fixtures mox==0.5.3 nose testtools |