



def statuecode(statuscode,p):
    assert statuscode == 200, "{}状态码报错：%s！= %s".format(p) % (statuscode, 200)

def error_code(error_code,p):
    assert error_code == 0, "{}error报错：%s！= %s".format(p) % (error_code, 0)

def runtime(result,p):
    runtime = float(result.elapsed.total_seconds())
    assert runtime <= 2,"{}响应时常过长：%s >= %s".format(p) % (runtime,2)


