'Ensure that Q objects query ListFields correctly.'

def test_q_lists(self):

    class BlogPost(Document, ):
        tags = ListField(StringField())
    BlogPost.drop_collection()
    BlogPost(tags=['python', 'mongo']).save()
    BlogPost(tags=['python']).save()
    self.assertEqual(BlogPost.objects(Q(tags='mongo')).count(), 1)
    self.assertEqual(BlogPost.objects(Q(tags='python')).count(), 2)
    BlogPost.drop_collection()
