def test_resolution_null(): def endpoint_func(): pass route = Route('/', endpoint_func) bound_route = route.bind(Application()) assert len(bound_route.get_required_args()) == 0
def test_resolution_basic(): mws = [FirstMW(), SecondMW()] def endpoint_func(url_arg, b): return {} route = Route('/<url_arg>/', endpoint_func, middlewares=mws) bound_route = route.bind(Application()) assert bound_route.is_required_arg('a') is True