'Ensure that using the `__in` operator on a non-iterable raises an
error.'

def test_in_operator_on_non_iterable(self):

    class User(Document, ):
        name = StringField()
    class BlogPost(Document, ):
        content = StringField()
        authors = ListField(ReferenceField(User))
    User.drop_collection()
    BlogPost.drop_collection()
    author = User.objects.create(name='Test    User')
    post = BlogPost.objects.create(content='Had    a    good    coffee    today...', authors=[author])
    blog_posts = BlogPost.objects(authors__in=[author])
    self.assertEqual(list(blog_posts), [post])
    self.assertRaises(TypeError, BlogPost.objects(authors__in=author.pk).count)
    self.assertRaises(TypeError, BlogPost.objects(authors__in=author).count)
