def test_list(self, app, model):
        for i in range(1, 12):
            model.create({'title': u'Book {0}'.format(i)})

        with app.test_client() as c:
            rv = c.get('/books/')

        assert rv.status == '200 OK'

        body = rv.data.decode('utf-8')
        assert 'Book 1' in body, "Should show books"
        # Ordering is lexical, so 9 will be on page two and 10 and 11 will
        # be after 1.
        assert 'Book 9' not in body, "Should not show more than 10 books"
        assert 'More' in body, "Should have more than one page"
dataset/ETHPy150Open GoogleCloudPlatform/getting-started-python/2-structured-data/tests/test_crud.py/TestCrudActions.test_list/original