def runTest(self): l = loc() @ultramini.arguments(ultramini.LOCATION) def some_function(foo): assert foo == l ultramini.convertFunction(l, some_function)
def runTest(self): req = loc() @ultramini.arguments(ultramini.REQUEST) def some_function(foo): assert foo == req ultramini.convertFunction(req, some_function)
def runTest(self): l = loc(headers=dict(foo='bar')) @ultramini.arguments(ultramini.HEADER.foo) def some_function(foo): assert foo == 'bar' ultramini.convertFunction(l, some_function)
def runTest(self): l = loc("foo=bar") @ultramini.arguments(ultramini.QUERY("bar", DEFAULT)) def another(bar): assert bar == DEFAULT ultramini.convertFunction(l, another)
def runTest(self): l = loc("foo=bar") @ultramini.arguments(ultramini.QUERY.foo) def some_function(foo): assert foo == "bar" ultramini.convertFunction(l, some_function)
def runTest(self): l = loc(query="channel=462280&ver=3&p=run") @ultramini.arguments(ultramini.QUERY.channel) def some_function(channel): assert channel == "462280" ultramini.convertFunction(l, some_function)
def runTest(self): l = loc(headers=dict(Cookie="foo=bar")) @ultramini.arguments(ultramini.COOKIE('bar', DEFAULT)) def another(foo): assert foo == DEFAULT ultramini.convertFunction(l, another)
def runTest(self): l = loc("foo=bar") @ultramini.arguments(ultramini.QUERY('bar', DEFAULT)) def another(bar): assert bar == DEFAULT ultramini.convertFunction(l, another)
def runTest(self): l = loc("foo=bar&foo=baz") @ultramini.arguments(ultramini.QUERIES('bar', DEFAULT)) def another(foo): assert foo == DEFAULT ultramini.convertFunction(l, another)
def runTest(self): l = loc("foo=bar&foo=baz") @ultramini.arguments(ultramini.QUERIES("bar", DEFAULT)) def another(foo): assert foo == DEFAULT ultramini.convertFunction(l, another)
def runTest(self): l = loc(body='foo=bar&foo=baz', method='post') @ultramini.arguments(ultramini.ARGS('bar', DEFAULT)) def another(foo): assert foo == DEFAULT ultramini.convertFunction(l, another)
def runTest(self): l = loc(body='foo=bar&foo=baz', method='post') @ultramini.arguments(ultramini.ARGS.foo) def some_function(foo): assert foo == ['bar', 'baz'] ultramini.convertFunction(l, some_function)
def runTest(self): l = loc(headers=dict(foo="bar")) @ultramini.arguments(ultramini.HEADER.foo) def some_function(foo): assert foo == "bar" ultramini.convertFunction(l, some_function)
def runTest(self): l = loc(headers=dict(Cookie="foo=bar")) @ultramini.arguments(ultramini.COOKIE("bar", DEFAULT)) def another(foo): assert foo == DEFAULT ultramini.convertFunction(l, another)
def runTest(self): l = loc(headers=dict(Cookie="foo=bar")) @ultramini.arguments(ultramini.COOKIE.foo) def some_function(foo): assert foo == "bar" ultramini.convertFunction(l, some_function)
def runTest(self): l = loc(body="foo=bar&foo=baz", method="post") @ultramini.arguments(ultramini.ARGS("bar", DEFAULT)) def another(foo): assert foo == DEFAULT ultramini.convertFunction(l, another)
def runTest(self): l = loc(body="foo=bar&foo=baz", method="post") @ultramini.arguments(ultramini.ARGS.foo) def some_function(foo): assert foo == ["bar", "baz"] ultramini.convertFunction(l, some_function)
def runTest(self): l = loc("foo=bar") @ultramini.arguments(ultramini.QUERY.foo) def some_function(foo): assert foo == 'bar' ultramini.convertFunction(l, some_function)
def runTest(self): l = loc("foo=bar&foo=baz") @ultramini.arguments(ultramini.QUERIES.foo) def some_function(foo): foo = tuple(foo) assert foo == ("bar", "baz") ultramini.convertFunction(l, some_function)
def runTest(self): l = loc("foo=bar&foo=baz") @ultramini.arguments(ultramini.QUERIES.foo) def some_function(foo): foo = tuple(foo) assert foo == ('bar', 'baz') ultramini.convertFunction(l, some_function)
def runTest(self): @ultramini.arguments(ultramini.SITE) def some_function(foo): assert foo == PASSED ultramini.convertFunction(loc(site=PASSED), some_function)
def runTest(self): @ultramini.arguments(ultramini.COOKIE("missing", DEFAULT)) def another(foo): assert foo == DEFAULT ultramini.convertFunction(loc(), another)
def runTest(self): @ultramini.arguments(1234) def some_function(channel): assert channel == 1234 ultramini.convertFunction(loc(), some_function)
def runTest(self): @ultramini.arguments(ultramini.COOKIE('missing', DEFAULT)) def another(foo): assert foo == DEFAULT ultramini.convertFunction(loc(), another)
def runTest(self): @ultramini.arguments(ultramini.URI) def some_function(foo): assert foo == "/foo.gif" ultramini.convertFunction(loc(uri="/foo.gif"), some_function)
def runTest(self): @ultramini.arguments(ultramini.RESOURCE) def some_function(foo): assert foo == PASSED ultramini.convertFunction(loc(resource=PASSED), some_function)
def runTest(self): @ultramini.arguments(ultramini.METHOD) def some_function(foo): assert foo == "GLORP" ultramini.convertFunction(loc(method="GLORP"), some_function)