Commit c16ed66c by taoke

企业云账号密码配置化

parent 8cb294fa
......@@ -40,5 +40,6 @@ class BmyConfig(BaseConfig):
defaultToken = "Basic aHpjcF93ZWI6MTIzNDU2" # 获取token 原始token
# 测试环境
test_host = "http://testyun.banmago.com/api"
test_name_password = {"username": "15151500000", "password": "bmy123456"}
......@@ -9,7 +9,7 @@ from common.db import RedisString
from config import BmyConfig
@pytest.fixture(scope='session')
# @pytest.fixture(scope='session')
class SSOLogin():
"""SSO登录"""
def _sso_pwd_encrypted(self, org_pwd):
......@@ -113,12 +113,12 @@ class BMY():
if __name__ == '__main__':
# SSO登录测试
sso_token = SSOLogin().sso_login(url=BaseConfig.sso_url,
method='post',)
print(sso_token)
# indata= {"username":"15150000000","password":"A123456"}
# token= BMY().bmy_login(indata,getToken=False)
# print(token)
# # SSO登录测试
# sso_token = SSOLogin().sso_login(url=BaseConfig.sso_url,
# method='post',)
# print(sso_token)
# BMY登录
indata= BmyConfig.test_name_password
token= BMY().bmy_login(indata,getToken=False)
print(token)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment