diff options
Diffstat (limited to 'distutils2/tests/test_command_upload.py')
| -rw-r--r-- | distutils2/tests/test_command_upload.py | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/distutils2/tests/test_command_upload.py b/distutils2/tests/test_command_upload.py index ac1ec54..61c6654 100644 --- a/distutils2/tests/test_command_upload.py +++ b/distutils2/tests/test_command_upload.py @@ -1,4 +1,3 @@ -# encoding: utf-8 """Tests for distutils2.command.upload.""" import os @@ -44,7 +43,7 @@ repository:http://another.pypi/ """ -#@skip if no threading, see end of file +@unittest.skipIf(threading is None, 'needs threading') class UploadTestCase(support.TempdirManager, support.EnvironRestorer, support.LoggingCatcher, PyPIServerTestCase): @@ -113,8 +112,8 @@ class UploadTestCase(support.TempdirManager, support.EnvironRestorer, # what did we send? handler, request_data = self.pypi.requests[-1] headers = handler.headers - self.assertIn('dédé', request_data) - self.assertIn('xxx', request_data) + self.assertIn('dédé'.encode('utf-8'), request_data) + self.assertIn(b'xxx', request_data) self.assertEqual(int(headers['content-length']), len(request_data)) self.assertLess(int(headers['content-length']), 2500) @@ -149,12 +148,8 @@ class UploadTestCase(support.TempdirManager, support.EnvironRestorer, "----------------GHSKFJDLGDS7543FJKLFHRE75642756743254" .encode())[1:4] - self.assertIn('name=":action"', action) - self.assertIn('doc_upload', action) - - -UploadTestCase = unittest.skipIf(threading is None, 'needs threading')( - UploadTestCase) + self.assertIn(b'name=":action"', action) + self.assertIn(b'doc_upload', action) def test_suite(): |
