daily/Utils/TestUtils.py

9 lines
452 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.

from Utils.AuthUtils import Token, create_token
from Context.common import ctx
def init_test_env():
ctx.env = "test"
print("不过期管理员token", Token.create_token({"uid": 'c25a9e2179d34ac5991a88226939a0ec',"role":'admin'}, expires_delta=None))
print("不过期信用评级应用token", create_token({"uid": 'c25a9e2179d34ac5991a88226939a0ec',"role":'admin'},secret_key="6d5ff8c903f94fe88501d15085398709", expires_delta=None))