'Ensure that a GenericReferenceField can handle choices as strings'

def test_generic_reference_string_choices(self):

    class Link(Document, ):
        title = StringField()
    class Post(Document, ):
        title = StringField()
    class Bookmark(Document, ):
        bookmark_object = GenericReferenceField(choices=('Post', Link))
    Link.drop_collection()
    Post.drop_collection()
    Bookmark.drop_collection()
    link_1 = Link(title='Pitchfork')
    link_1.save()
    post_1 = Post(title='Behind    the    Scenes    of    the    Pavement    Reunion')
    post_1.save()
    bm = Bookmark(bookmark_object=link_1)
    bm.save()
    bm = Bookmark(bookmark_object=post_1)
    bm.save()
    bm = Bookmark(bookmark_object=bm)
    self.assertRaises(ValidationError, bm.validate)
