'Ensure dereferencing out of the document registry throws a
`NotRegistered` error.'

def test_generic_reference_document_not_registered(self):

    class Link(Document, ):
        title = StringField()
    class User(Document, ):
        bookmarks = ListField(GenericReferenceField())
    Link.drop_collection()
    User.drop_collection()
    link_1 = Link(title='Pitchfork')
    link_1.save()
    user = User(bookmarks=[link_1])
    user.save()
    del _document_registry['Link']
    user = User.objects.first()
    try:
        user.bookmarks
        raise AssertionError('Link    was    removed    from    the    registry')
    except NotRegistered:
        pass
