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 | |
| 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)
| -rw-r--r-- | debian/changelog | 2 | ||||
| -rw-r--r-- | tests/test_auth.py | 11 |
2 files changed, 13 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog index cad5c31c..e934f203 100644 --- a/debian/changelog +++ b/debian/changelog @@ -7,6 +7,8 @@ python-apt (0.8.8ubuntu5) UNRELEASED; urgency=low debug. * aptsources/distro.py: Replace the deprecated getiterator() ElementTree method with iter(), to avoid raising a PendingDeprecationWarning. + * tests/test_auth.py: Temporarily disable $http_proxy for the tests, as + gnupg does not get along with proxies (LP #789049) -- Martin Pitt <martin.pitt@ubuntu.com> Tue, 20 Nov 2012 09:43:36 +0100 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() |
