boto/boto — pull request #2443 by danielgtaylor (2014-07-23 20:02:46+00:00)
Title: Fix S3 mock encoding bug

This fixes a bug in our test mock S3 service as reported in https://github.com/GoogleCloudPlatform/gsutil/issues/214 (part of #2437) where we were attempting incorrectly to encode a `bytes` object.

It also adds a new unit test to ensure the new behavior works for both bytes and strings in all supported Python versions. It seems like our `KeyFile` tests are the only place these mocks are used within Boto, so I've added a quick test there that should prevent regressions in the future.

@jamesls, @mfschwartz please take a look.