From 4f5d7ccc6a082dbc3ce0b87b3c34fb9ec98f4301 Mon Sep 17 00:00:00 2001
From: Balint Reczey <balint.reczey@canonical.com>
Date: Tue, 12 Jan 2021 17:35:17 +0100
Subject: [PATCH] tests: Don't use proxy when testing connection to ::1
Forwarded: https://github.com/pycurl/pycurl/pull/668

The environment where the test is run may not disable proxy for ::1,
which is the case in Ubuntu CI due to older releases not handling ::1
in no_proxy properly.

https://bugs.launchpad.net/ubuntu/+source/curl/+bug/1908136
---
 tests/open_socket_cb_test.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tests/open_socket_cb_test.py b/tests/open_socket_cb_test.py
index b2ddbeb..a9a9d70 100644
--- a/tests/open_socket_cb_test.py
+++ b/tests/open_socket_cb_test.py
@@ -77,6 +77,7 @@ class OpenSocketCbTest(unittest.TestCase):
     def test_socket_open_ipv6(self):
         self.curl.setopt(pycurl.OPENSOCKETFUNCTION, socket_open_ipv6)
         self.curl.setopt(self.curl.URL, 'http://[::1]:8380/success')
+        self.curl.setopt(self.curl.NOPROXY, '::1')
         sio = util.BytesIO()
         self.curl.setopt(pycurl.WRITEFUNCTION, sio.write)
         try:
-- 
2.25.1

