'Test a relationship that spans a GenericRelation field.
IE. A reverse generic relationship.'

def test_generic_relation(self):

    class BookmarkSerializer(serializers.ModelSerializer, ):
        tags = serializers.StringRelatedField(many=True)
        class Meta:
            model = Bookmark
            fields = (u'tags', u'url')
    serializer = BookmarkSerializer(self.bookmark)
    expected = {u'tags': [u'django', u'python'], u'url': u'https://www.djangoproject.com/'}
    assert (serializer.data == expected)
