예제 #1
0
def test_post_reply():
    r = app.get('/test/1/')
    f = r.forms[0]
    f['content'] = 'Some reply'
    f['subject'] = 'My subject'
    r = f.submit()
    r = app.get('/test/')
    assert "Some reply" in r
    assert "My subject" in r
예제 #2
0
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
예제 #3
0
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")
예제 #4
0
def test_visit_thread():
    r = app.get('/test/1/')
    assert "This is a post" in r
    r = app.get('/test/1')
    assert "This is a post" in r
예제 #5
0
def test_visit_board():
    r = app.get('/test/')
    assert "This is a post" in r
    r = app.get('/test')
    assert "This is a post" in r
예제 #6
0
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
예제 #7
0
def test_home():
    r = app.get('/')