          data = {'text': 'foobar' * 100}
          request = factory.post('/', data, HTTP_ACCEPT='text/html')
          response = self.view(request).render()
          expected_error = '<span class="help-block">Ensure this field has no more than 100 characters.</span>'
          assert expected_error in response.rendered_content.decode('utf-8')
  
  
  EXPECTED_QUERIES_FOR_PUT = 2
  
  
 
</s> remove         assert expected_error in response.rendered_content.decode('utf-8')
 </s> add         assert expected_error in response.rendered_content.decode() </s> remove         content = response.content.decode('utf8')
 </s> add         content = response.content.decode() </s> remove         content = response.content.decode('utf8')
 </s> add         content = response.content.decode() </s> remove         content = response.content.decode('utf8')
 </s> add         content = response.content.decode() </s> remove         content = response.content.decode('utf8')
 </s> add         content = response.content.decode()
        assert expected_error in response.rendered_content.decode()
          data = {'text': 'foobar' * 100}
          request = factory.post('/', data, HTTP_ACCEPT='text/html')
          response = self.view(request).render()
          expected_error = '<span class="help-block">Ensure this field has no more than 100 characters.</span>'
        assert expected_error in response.rendered_content.decode()
  
  
  EXPECTED_QUERIES_FOR_PUT = 2
  
  
keep keep keep keep replace keep keep keep keep keep
 Drop default 'utf-8' to .encode()/.decode() (#6633)

A Python 3 cleanup that allows for less noise in the code.

https://docs.python.org/3/library/stdtypes.html#bytes.decode
https://docs.python.org/3/library/stdtypes.html#str.encode 
tests/test_generics.py