Permalink
Browse files

Merge "Ensure shell tests use isolated env variables set"

  • Loading branch information...
2 parents 1696954 + cdab772 commit 593adf229aacabf66ce8aea4f147c131c9765374 Jenkins committed with openstack-gerrit Mar 28, 2013
Showing with 2 additions and 4 deletions.
  1. +2 −4 tests/test_shell.py
View
6 tests/test_shell.py
@@ -20,10 +20,8 @@
class ShellTest(utils.TestCase):
def make_env(self, exclude=None):
- for var, val in FAKE_ENV.items():
- if var == exclude:
- continue
- self.useFixture(fixtures.EnvironmentVariable(var, val))
+ env = dict((k, v) for k, v in FAKE_ENV.items() if k != exclude)
+ self.useFixture(fixtures.MonkeyPatch('os.environ', env))
def setUp(self):
super(ShellTest, self).setUp()

0 comments on commit 593adf2

Please sign in to comment.