'Ensure that a ListField properly dereferences generic references.'

def test_generic_reference_list(self):

    class Link(Document, ):
        title = StringField()
    class Post(Document, ):
        title = StringField()
    class User(Document, ):
        bookmarks = ListField(GenericReferenceField())
    Link.drop_collection()
    Post.drop_collection()
    User.drop_collection()
    link_1 = Link(title='Pitchfork')
    link_1.save()
    post_1 = Post(title='Behind    the    Scenes    of    the    Pavement    Reunion')
    post_1.save()
    user = User(bookmarks=[post_1, link_1])
    user.save()
    user = User.objects(bookmarks__all=[post_1, link_1]).first()
    self.assertEqual(user.bookmarks[0], post_1)
    self.assertEqual(user.bookmarks[1], link_1)
