コード例 #1
0
ファイル: tests.py プロジェクト: gi0baro/weppy
def logged_client():
    c = app.test_client()
    with c.get('/auth/login').context as ctx:
        c.post('/auth/login', data={
            'email': '*****@*****.**',
            'password': '******',
            '_csrf_token': list(ctx.session._csrf)[-1]
        }, follow_redirects=True)
        return c
コード例 #2
0
ファイル: tests.py プロジェクト: zhongjl/emmett
def logged_client():
    c = app.test_client()
    with c.get('/auth/login').context as ctx:
        c.post('/auth/login',
               data={
                   'email': '*****@*****.**',
                   'password': '******',
                   '_csrf_token': list(ctx.session._csrf)[-1]
               },
               follow_redirects=True)
        return c
コード例 #3
0
ファイル: tests.py プロジェクト: gi0baro/weppy
def client():
    return app.test_client()
コード例 #4
0
ファイル: tests.py プロジェクト: zhongjl/emmett
def client():
    return app.test_client()