          pk = '1'
          kwarg = '1234'
          response = self.client.get('/regex/{}/detail/{}/'.format(pk, kwarg))
          assert response.status_code == 200
          assert json.loads(response.content.decode('utf-8')) == {'pk': pk, 'kwarg': kwarg}
  
  
  class TestViewInitkwargs(URLPatternsTestCase, TestCase):
      urlpatterns = [
          url(r'^example/', include(notes_router.urls)),
 
</s> remove         content = response.content.decode('utf-8')
 </s> add         content = response.content.decode() </s> remove         content = response.content.decode('utf8')
 </s> add         content = response.content.decode() </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()
        assert json.loads(response.content.decode()) == {'pk': pk, 'kwarg': kwarg}
          pk = '1'
          kwarg = '1234'
          response = self.client.get('/regex/{}/detail/{}/'.format(pk, kwarg))
          assert response.status_code == 200
        assert json.loads(response.content.decode()) == {'pk': pk, 'kwarg': kwarg}
  
  
  class TestViewInitkwargs(URLPatternsTestCase, TestCase):
      urlpatterns = [
          url(r'^example/', include(notes_router.urls)),
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_routers.py