      @override_settings(ROOT_URLCONF='tests.browsable_api.test_browsable_nested_api')
      def test_login(self):
          response = self.client.get('/api/')
          assert 200 == response.status_code
          content = response.content.decode('utf-8')
          assert 'form action="/api/"' in content
          assert 'input name="nested.one"' in content
          assert 'input name="nested.two"' in content
 
</s> remove         assert json.loads(response.content.decode('utf-8')) == {'pk': pk, 'kwarg': kwarg}
 </s> add         assert json.loads(response.content.decode()) == {'pk': pk, 'kwarg': kwarg} </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()
        content = response.content.decode()
      @override_settings(ROOT_URLCONF='tests.browsable_api.test_browsable_nested_api')
      def test_login(self):
          response = self.client.get('/api/')
          assert 200 == response.status_code
        content = response.content.decode()
          assert 'form action="/api/"' in content
          assert 'input name="nested.one"' in content
          assert 'input name="nested.two"' in content
keep keep keep keep replace 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/browsable_api/test_browsable_nested_api.py