Python 3: fix tests on HTTP headers

HTTP headers are encoded to bytes. Store headers at (key, value) tuples instead
of Unicode strings.

Check also that non-ASCII Unicode headers are encoded to UTF-8.

Change-Id: Ie45f5a5ba63f539a723a7ac5649779d8efb3e912
Add requests related unit-tests

This change improves unit tests of the new code added by the port to requests.
Raw upload and chunked upload in put_object are now covered.

Change-Id: I995b23a74bc4b00bf5761362b1f1405bb8662311
Fix swiftclient.client.quote() for Python 3

On Python 3, urllib.parse.quote() accepts bytes and str (unicode) types and
always return str (unicode).

Add also more tests with non-ASCII characters.

Change-Id: I8e0f19da7240e874392327d0da074ed4abb7d213
Merge "Python 3: fix tests on HTTP headers"
Merge "Add requests related unit-tests"
Add tests for bin/swift

Tests are written to ensure bin/swift is working properly and using
functions from swiftclient modules as expected.

Change-Id: Idb0581516b7e0a41c97977bb0bb9f8290f67ad13
Fix test_multithreading on Python 3

* On Python 3, the printer doesn't encode Unicode to utf8 anymore, since
  print() expects a Unicode string.

* Update unit tests for Python 3 since repr() doesn't escape non-ASCII
  characters in Unicode strings anymore:
  http://legacy.python.org/dev/peps/pep-3138/

Change-Id: I89471019d691a46651312d6a49964b719192148a
Merge "Fix swiftclient.client.quote() for Python 3"
Merge "Fix test_multithreading on Python 3"
Makes use of requests.Session

This allows better connection pooling and may improve performances.

Change-Id: I69e986b7387dd3ac281731b8355a3eec34a537f8
Use quote/unquote from six module for py3

Change-Id: I42cff32fbf3febd6dd6a7171b9214f93b4414f9a
Remove validate_headers

It wasn't used anymore since moved up to requests (and it fails in py3).

Change-Id: Ic8a80ae09ca6445696a9cf34ffb503c5ff51bc79
Fix test_raw_upload test

We were testing the test but we were not testing that we have actually
properly uploaded the object with the right content-len

(and it was broken under py3)

Change-Id: Ifa91c30532090cac9f8e18ff18eaf5e6c98737d1
Merge "Add tests for bin/swift"
Merge "Use quote/unquote from six module for py3"
Merge "Remove validate_headers"
Updated test_shell for Python3

Change-Id: Ia76e544fa6e0a222c260191a1ab74939078ed2fb
Merge "Fix test_raw_upload test"
Fix up StringIO use in tests for py3

Some spots in this file were already referencing six.StringIO, but
some were still using StringIO.StringIO, which does not work on
py3. This patch just makes them all use six.StringIO and removes the
now-unused (and wrong, on py3) import.

Change-Id: I3c7311c3983f4eb409eedb6f85ede6ffe4059e63
Fixed several shell tests on Python3.

They currently fail because on Python3 arbitrary objects cannot be compared, in
this case, MagicMock and int. In Python2 these comparisons silently pass.

Change-Id: I468c2137702a454365886099e827d329cb1d7209