Removed http proxy environment variable so that httpretty can work
If test environment is located behind a http proxy, tox and pip require to set http proxy environment variable. However httpretty mock library does NOT work as expected if http proxy is set. Therefor code to remove the http proxy environment variable is added into the fixture. Change-Id: Ibd3bb833774b1362e628725603b9b274b09375bd Closes-Bug: #1403046
This commit is contained in:
parent
8a07fdffb2
commit
f746e172f4
|
@ -13,6 +13,7 @@
|
|||
# under the License.
|
||||
|
||||
import json
|
||||
import os
|
||||
import re
|
||||
import sys
|
||||
|
||||
|
@ -226,6 +227,10 @@ class TestCase(testtools.TestCase):
|
|||
class ShellTestNoMox(TestCase):
|
||||
def setUp(self):
|
||||
super(ShellTestNoMox, self).setUp()
|
||||
# httpretty doesn't work as expected if http proxy environment
|
||||
# variable is set.
|
||||
os.environ = dict((k, v) for (k, v) in os.environ.items()
|
||||
if k.lower() not in ('http_proxy', 'https_proxy'))
|
||||
self.set_fake_env(FAKE_ENV_KEYSTONE_V2)
|
||||
|
||||
def shell(self, argstr):
|
||||
|
|
Loading…
Reference in New Issue