def test_encode_body_utf8_string_to_bytes(self):
     self.req.body = u('☃')
     AWS4Auth.encode_body(self.req)
     self.assertEqual(self.req.body, b'\xe2\x98\x83')
     expected = 'text/plain; charset=utf-8'
     self.assertEqual(self.req.headers['content-type'], expected)
 def test_encode_body_utf8_string_to_bytes(self):
     self.req.body = u('☃')
     AWS4Auth.encode_body(self.req)
     self.assertEqual(self.req.body, b'\xe2\x98\x83')
     expected = 'text/plain; charset=utf-8'
     self.assertEqual(self.req.headers['content-type'], expected)
 def test_encode_body_unicode_to_bytes(self):
     self.req.body = u('hello')
     AWS4Auth.encode_body(self.req)
     self.assertEqual(self.req.body, b'\x68\x65\x6c\x6c\x6f')
     expected = 'text/plain; charset=utf-8'
     self.assertEqual(self.req.headers['content-type'], expected)
 def test_encode_body_unicode_to_bytes(self):
     self.req.body = u('hello')
     AWS4Auth.encode_body(self.req)
     self.assertEqual(self.req.body, b'\x68\x65\x6c\x6c\x6f')
     expected = 'text/plain; charset=utf-8'
     self.assertEqual(self.req.headers['content-type'], expected)