def test_post_list(): app.post('/test/post', params=dict( content="Test post OP")) for x in range(10): app.post('/test/1/post', params=dict( content="Test post #" + str(x))) r = app.get('/test') assert "Test post OP" in r assert "Test post #3" not in r assert "Test post #9" in r
def test_no_blank_post(): r = app.post('/test/post', params=dict( content="")) assert "No, you must" in r
def test_thread_order(): setUp() r = app.post('/test/post', params=dict( content="Test post NEW")) r = app.get('/test') assert r.body.index("Test post NEW") < r.body.index("This is a post")
def test_post_to_board(): r = app.post('/test/post', params=dict( content="Test post 2242")) r = app.get('/test/') assert "Test post 2242" in r