示例#1
0
def molten_client(headers=None, params=None):
    app = molten.App(routes=[molten.Route('/hello/{name}/{age}', hello)])
    client = TestClient(app)
    uri = app.reverse_uri('hello', name='Jim', age=24)
    return client.request('GET', uri, headers=headers, params=params)
示例#2
0
def molten_client(headers=None, params=None):
    app = molten.App(routes=[molten.Route("/hello/{name}/{age}", hello)])
    client = TestClient(app)
    uri = app.reverse_uri("hello", name="Jim", age=24)
    return client.request("GET", uri, headers=headers, params=params)
示例#3
0
import molten

from config import PING_MESSAGE


def ping():
    return PING_MESSAGE.format(app='molten')


app = molten.App(routes=[molten.Route('/', ping)])