def test_path_map_alternate_arg_key(): router = URIPathRouter(path_key='foo') sentinel = object() router.connect(sentinel, foo='/index') assert router.match(foo='/index').target is sentinel
def test_path_router_connect_resolve(): router = URIPathRouter() sentinel = object() router.connect(sentinel, path='/outer/inner') match = router.match(path='/outer/inner') assert match.target is sentinel
def test_path_router_root(): router = URIPathRouter() sentinel = object() router.connect(sentinel, path='/') assert router.match(path='/').target is sentinel