                          data.pop(name, None)
                  content = renderer.render(data, accepted, context)
              else:
                  content = None
  
              # Generate a generic form that includes a content type field,
              # and a content field.
 
</s> remove         self.assertInHTML('<tr><th>Items</th><td>a string</td></tr>', str(response.content))
 </s> add         self.assertContains(response, '<tr><th>Items</th><td>a string</td></tr>', html=True) </s> remove         self.assertInHTML('<tr><th>Foo</th><td>a string</td></tr>', str(response.content))
 </s> add         self.assertContains(response, '<tr><th>Foo</th><td>a string</td></tr>', html=True) </s> remove         self.assertInHTML('<tr><th>Iteritems</th><td>a string</td></tr>', str(response.content))
 </s> add         self.assertContains(response, '<tr><th>Iteritems</th><td>a string</td></tr>', html=True) </s> remove         params_str = ''
        for key, val in mediatype.params.items():
            params_str += '; %s=%s' % (key, val)
        expected = 'test/*' + params_str
        assert str(mediatype) == expected
 </s> add         assert str(mediatype) == 'test/*; foo=bar' </s> remove             ret += "; %s=%s" % (key, val)
 </s> add             ret += "; %s=%s" % (key, val.decode('ascii'))
                # Renders returns bytes, but CharField expects a str.
                content = content.decode('utf-8')
                          data.pop(name, None)
                  content = renderer.render(data, accepted, context)
                # Renders returns bytes, but CharField expects a str.
                content = content.decode('utf-8')
              else:
                  content = None
  
              # Generate a generic form that includes a content type field,
              # and a content field.
keep add keep keep keep keep keep
 Fix all BytesWarning caught during tests (#5561)

Running the tests with bytes warning enabled shows some bytes/str
mixups. Fix them all.

Some examples of mixing usage:

str(b'foo') -- calling str() on bytes
b'foo' == 'foo' -- compare str with bytes
'foo' + b'bar' -- concatenating str and bytes 
rest_framework/renderers.py