          representation = self.field.to_representation(self.instance)
          assert representation == self.instance.pk.int
  
  
  class TestHyperlinkedRelatedField(APISimpleTestCase):
      def setUp(self):
          self.queryset = MockQueryset([
              MockObject(pk=1, name='foobar'),
              MockObject(pk=2, name='baz qux'),
          ])
 
</s> remove             view_name='example', read_only=True)
 </s> add             view_name='example',
            lookup_field='name',
            lookup_url_kwarg='name',
            queryset=self.queryset,
        ) </s> remove         assert response.data == [{"url": "http://testserver/example/notes/123/", "uuid": "123", "text": "foo bar"}]
 </s> add         assert response.data == [
            {"url": "http://testserver/example/notes/123/", "uuid": "123", "text": "foo bar"},
            {"url": "http://testserver/example/notes/a%20b/", "uuid": "a b", "text": "baz qux"},
        ]
@override_settings(ROOT_URLCONF=[
    url(r'^example/(?P<name>.+)/$', lambda: None, name='example'),
])
          representation = self.field.to_representation(self.instance)
          assert representation == self.instance.pk.int
  
  
@override_settings(ROOT_URLCONF=[
    url(r'^example/(?P<name>.+)/$', lambda: None, name='example'),
])
  class TestHyperlinkedRelatedField(APISimpleTestCase):
      def setUp(self):
          self.queryset = MockQueryset([
              MockObject(pk=1, name='foobar'),
              MockObject(pk=2, name='baz qux'),
          ])
keep keep keep add keep keep keep keep keep keep
 add URL path unquote to HyperlinkedRelatedField.to_internal_value 
tests/test_relations.py