def path(self): """Get the endpoint's path. The path is prepended by the parent's path, if it is not a root node. The returned path already has all variables evaluated. Returns: [str]: The endpoint's url. """ path = str(self.spec.get(PATH_KEY, "")).strip() url = join_urls(self.parent.path, path) if self.parent else path return self.spec_vars.evaluate(url)
def full_url_path(self): base_path = self.endpoint.path path = self.spec.get(PATH_KEY, "") full_url = join_urls(base_path, path) return self.endpoint.vars.evaluate(full_url)
def test_build_url_properly(self, url_1, url_2, expected): assert join_urls(url_1, url_2) == expected
def path(self): path = self.spec.get("path", "").strip() url = join_urls(self.parent.path, path) if self.parent else path return self.vars.evaluate(url)