示例#1
0
def init_test_request(given_config=None, static_state=[False]):
    if not static_state[0]:
        maketestwiki.run(True)
        static_state[0] = True
    request = TestRequest()
    request.given_config = given_config
    request = init(request)
    return request
示例#2
0
def init_test_request(given_config=None, static_state=[False]):
    if not static_state[0]:
        maketestwiki.run(True)
        static_state[0] = True
    request = TestRequest()
    request.given_config = given_config
    request = init(request)
    return request
示例#3
0
def init_test_request(given_config=None, static_state=[False]):
    from MoinMoin.request import request_cli
    from MoinMoin.user import User
    from MoinMoin.formatter.text_html import Formatter as HtmlFormatter
    if not static_state[0]:
        maketestwiki.run(True)
        static_state[0] = True
    request = request_cli.Request(given_config=given_config)
    request.form = request.args = request.setup_args()
    request.user = User(request)
    request.html_formatter = HtmlFormatter(request)
    request.formatter = request.html_formatter
    return request