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/p/y/pyramid-examples-HEAD/board/board/tests.py   pyramid-examples(Download)
    def test_index_(self):
        from board.views import index_
        # Make sure that index_() does not add empty posts
        postCount = db.query(Post).count()
        info = index_(testing.DummyRequest(params={'text': u''}, post=True))
        self.assertEqual(len(info['posts']), postCount)
        # Make sure that index_() increments the number of posts
        postCount = db.query(Post).count()
        info = index_(testing.DummyRequest(params={'text': u'four'}, post=True))