Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(3)  |  Call(2)  |  Derive(0)  |  Import(1)

src/f/l/flask-mongoengine-HEAD/tests/test_pagination.py   flask-mongoengine(Download)
from werkzeug.exceptions import NotFound
 
from flask.ext.mongoengine import MongoEngine, Pagination, ListFieldPagination
 
 
        self.assertRaises(NotFound, Pagination, Post.objects, 6, 10)
 
        paginator = Pagination(Post.objects, 1, 10)
        self._test_paginator(paginator)
 
        self.assertRaises(NotFound, Pagination, range(1, 42), 6, 10)
 
        paginator = Pagination(range(1, 42), 1, 10)
        self._test_paginator(paginator)