diff options
| author | Martin Pitt <martin.pitt@canonical.com> | 2012-11-20 11:41:48 +0100 |
|---|---|---|
| committer | Martin Pitt <martin.pitt@canonical.com> | 2012-11-20 11:41:48 +0100 |
| commit | d07479422c5930856ebb5ff362e176bd5c64441a (patch) | |
| tree | 5578717919fa9bc6151748ae8126aac8d08da7f4 /tests/test_auth.py | |
| parent | 7898eab688249a2200156c5be039d91ba58a8b39 (diff) | |
| download | python-apt-d07479422c5930856ebb5ff362e176bd5c64441a.tar.gz | |
tests/test_auth.py: Temporarily disable $http_proxy for the tests, as
gnupg does not get along with proxies (LP #789049)
Diffstat (limited to 'tests/test_auth.py')
| -rw-r--r-- | tests/test_auth.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/test_auth.py b/tests/test_auth.py index 7fb8160b..bc353427 100644 --- a/tests/test_auth.py +++ b/tests/test_auth.py @@ -285,6 +285,14 @@ class TestAuthKeys(TestCase): self.keyserver_port = int(keyserver_read.readline()) keyserver_read.close() + # temporarily disable proxy, as gnupg does not get along with that + # (LP #789049) + self.orig_proxy = os.environ.get('http_proxy') + try: + del os.environ['http_proxy'] + except KeyError: + pass + # wait a bit until server is ready time.sleep(0.5) @@ -295,6 +303,9 @@ class TestAuthKeys(TestCase): os.kill(self.keyserver_pid, 15) os.wait() + # restore proxy + if self.orig_proxy is not None: + os.environ['http_proxy'] = self.orig_proxy if __name__ == "__main__": unittest.main() |
