def test_url_named(self): """ Test creating a named `http.url` binding """ sent = wrap = self._mock_handler() out = http.url('test', r'/sup')(wrap) assert out is sent is wrap
def test_url_param(self): """ Test creating a bound `http.url` with params in the URL """ sent = wrap = self._mock_handler() out = http.url('test', r'/sup/<int:num>')(wrap) assert out is sent is wrap
def test_url_basic(self): """ Test basic functionality of `http.url` decorator """ sent = wrap = self._mock_handler() out = http.url(r'/sup')(wrap) assert out is sent is wrap
def test_url_wrap(self): """ Test the `http.url` decorator for `wrap` keyword usage """ sent = wrap = self._mock_handler() def other_wrap(target): assert target is sent is wrap return target out = http.url('test', r'/sup', wrap=other_wrap)(wrap) assert out is sent is wrap