apiAutoTest_zy7y/hooks.py

32 lines
448 B
Python
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import time
def get_current_highest():
"""获取当前时间戳"""
return int(time.time())
def sum_data(a, b):
"""计算函数"""
return a + b
def set_token(token: str):
"""设置token直接返回字典"""
return {"Authorization": token}
def skip():
return True
def skip_if(user_id):
if user_id > 300:
return True
else:
return False
def sql():
return "select * from sp_goods;"