123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130 |
- === modified file 'dulwich/tests/compat/test_client.py'
- --- old/dulwich/tests/compat/test_client.py 2018-11-05 19:27:24 +0000
- +++ new/dulwich/tests/compat/test_client.py 2018-11-17 19:32:09 +0000
- @@ -544,6 +544,8 @@
- min_git_version = (1, 7, 0, 2)
-
- def setUp(self):
- + if '__pypy__' in sys.modules:
- + self.skipTest('urllib3 not available for pypy in debian')
- CompatTestCase.setUp(self)
- DulwichClientTestBase.setUp(self)
- self._httpd = HTTPGitServer(("localhost", 0), self.gitroot)
- === modified file 'dulwich/tests/test_client.py'
- --- old/dulwich/tests/test_client.py 2018-11-17 19:26:16 +0000
- +++ new/dulwich/tests/test_client.py 2018-11-17 19:32:27 +0000
- @@ -35,7 +35,8 @@
- except ImportError:
- import urllib.parse as urlparse
-
- -import urllib3
- +if '__pypy__' not in sys.modules:
- + import urllib3
-
- import dulwich
- from dulwich import (
- @@ -550,12 +551,20 @@
- self.assertTrue(isinstance(c, SSHGitClient))
-
- def test_http(self):
- + if '__pypy__' in sys.modules:
- + self.skipTest('urllib3 not available for pypy in debian')
- +
- +
- url = 'https://github.com/jelmer/dulwich'
- c, path = get_transport_and_path(url)
- self.assertTrue(isinstance(c, HttpGitClient))
- self.assertEqual('/jelmer/dulwich', path)
-
- def test_http_auth(self):
- + if '__pypy__' in sys.modules:
- + self.skipTest('urllib3 not available for pypy in debian')
- +
- +
- url = 'https://user:passwd@github.com/jelmer/dulwich'
-
- c, path = get_transport_and_path(url)
- @@ -566,6 +575,9 @@
- self.assertEqual('passwd', c._password)
-
- def test_http_auth_with_username(self):
- + if '__pypy__' in sys.modules:
- + self.skipTest('urllib3 not available for pypy in debian')
- +
- url = 'https://github.com/jelmer/dulwich'
-
- c, path = get_transport_and_path(
- @@ -577,6 +589,9 @@
- self.assertEqual('blah', c._password)
-
- def test_http_auth_with_username_and_in_url(self):
- + if '__pypy__' in sys.modules:
- + self.skipTest('urllib3 not available for pypy in debian')
- +
- url = 'https://user:passwd@github.com/jelmer/dulwich'
-
- c, path = get_transport_and_path(
- @@ -588,6 +603,10 @@
- self.assertEqual('passwd', c._password)
-
- def test_http_no_auth(self):
- + if '__pypy__' in sys.modules:
- + self.skipTest('urllib3 not available for pypy in debian')
- +
- +
- url = 'https://github.com/jelmer/dulwich'
-
- c, path = get_transport_and_path(url)
- @@ -670,6 +689,9 @@
- 'prospero://bar/baz')
-
- def test_http(self):
- + if '__pypy__' in sys.modules:
- + self.skipTest('urllib3 not available for pypy in debian')
- +
- url = 'https://github.com/jelmer/dulwich'
- c, path = get_transport_and_path_from_url(url)
- self.assertTrue(isinstance(c, HttpGitClient))
- @@ -677,6 +699,9 @@
- self.assertEqual('/jelmer/dulwich', path)
-
- def test_http_port(self):
- + if '__pypy__' in sys.modules:
- + self.skipTest('urllib3 not available for pypy in debian')
- +
- url = 'https://github.com:9090/jelmer/dulwich'
- c, path = get_transport_and_path_from_url(url)
- self.assertEqual('https://github.com:9090', c.get_url(b'/'))
- @@ -909,6 +934,11 @@
-
- class HttpGitClientTests(TestCase):
-
- + def setUp(self):
- + super(HttpGitClientTests, self).setUp()
- + if '__pypy__' in sys.modules:
- + self.skipTest('urllib3 not available for pypy in debian')
- +
- @staticmethod
- def b64encode(s):
- """Python 2/3 compatible Base64 encoder. Returns string."""
- @@ -1007,12 +1037,18 @@
-
- class DefaultUrllib3ManagerTest(TestCase):
-
- + def setUp(self):
- + super(DefaultUrllib3ManagerTest, self).setUp()
- + if '__pypy__' in sys.modules:
- + self.skipTest('urllib3 not available for pypy in debian')
- +
- def test_no_config(self):
- manager = default_urllib3_manager(config=None)
- self.assertEqual(manager.connection_pool_kw['cert_reqs'],
- 'CERT_REQUIRED')
-
- def test_config_no_proxy(self):
- +
- manager = default_urllib3_manager(config=ConfigDict())
- self.assertNotIsInstance(manager, urllib3.ProxyManager)
-
|