Fix broken tests from previous pull request.

We fake the _content in some tests. We were doing this with a Unicode
object rather than bytes, which breaks encoding detection.