summaryrefslogtreecommitdiff
path: root/Lib/distutils/tests/test_upload.py
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2013-10-08 21:08:48 +0300
committerSerhiy Storchaka <storchaka@gmail.com>2013-10-08 21:08:48 +0300
commit9d67ec51a65af6408887041d8e841c1bf7d046b7 (patch)
treec3201ce7b6a3128cb8216a6e04ad208d4d9428d9 /Lib/distutils/tests/test_upload.py
parentc3a0b4fef5f33c776857fe336932d163cd56815d (diff)
parent3cf0676c2d969a7c795c3ccf152e2dd77008ee14 (diff)
downloadcpython-9d67ec51a65af6408887041d8e841c1bf7d046b7.tar.gz
Issue #18037: Do not escape '\u' and '\U' in raw strings.
Diffstat (limited to 'Lib/distutils/tests/test_upload.py')
-rw-r--r--Lib/distutils/tests/test_upload.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/Lib/distutils/tests/test_upload.py b/Lib/distutils/tests/test_upload.py
index 4c6464a32e..4a71ca4a8d 100644
--- a/Lib/distutils/tests/test_upload.py
+++ b/Lib/distutils/tests/test_upload.py
@@ -72,12 +72,12 @@ class uploadTestCase(PyPIRCCommandTestCase):
def setUp(self):
super(uploadTestCase, self).setUp()
- self.old_class = httpclient.HTTPConnection
- self.conn = httpclient.HTTPConnection = FakeConnection()
-
- def tearDown(self):
- httpclient.HTTPConnection = self.old_class
- super(uploadTestCase, self).tearDown()
+ if hasattr(httpclient, 'HTTPSConnection'):
+ self.addCleanup(setattr, httpclient, 'HTTPSConnection',
+ httpclient.HTTPSConnection)
+ else:
+ self.addCleanup(delattr, httpclient, 'HTTPSConnection')
+ self.conn = httpclient.HTTPSConnection = FakeConnection()
def test_finalize_options(self):
@@ -88,7 +88,7 @@ class uploadTestCase(PyPIRCCommandTestCase):
cmd.finalize_options()
for attr, waited in (('username', 'me'), ('password', 'secret'),
('realm', 'pypi'),
- ('repository', 'http://pypi.python.org/pypi')):
+ ('repository', 'https://pypi.python.org/pypi')):
self.assertEqual(getattr(cmd, attr), waited)
def test_saved_password(self):