def get_url(endpoint): host = Config.url() url = host + endpoint return url
def get_url(doc): host = Config.url() doc = doc url = ''.join([host,doc]) return url
def get_url(EndPoint): host = Config.url() endpoint = EndPoint url = ''.join([host, endpoint]) return url
def __init__(self): self.url = Config.url()
def __init__(self):#构造方法,初始化对象 self.url = Config.url()
def get_url(EndPoint): # 用例中定义的endpoint都不一样,写在这里,怎么修改都不会影响用例,用例只要把传递参数过来 host = Config.url() endpoint = EndPoint url = ''.join([host, endpoint]) return url