'Ensure that custom QuerySet classes may be used.'

def test_custom_querysets_managers_directly(self):

    class CustomQuerySetManager(QuerySetManager, ):
        @staticmethod
        def get_queryset(doc_cls, queryset):
            return queryset(is_published=True)
    class Post(Document, ):
        is_published = BooleanField(default=False)
        published = CustomQuerySetManager()
    Post.drop_collection()
    Post().save()
    Post(is_published=True).save()
    self.assertEqual(Post.objects.count(), 2)
    self.assertEqual(Post.published.count(), 1)
    Post.drop_collection()
