Commit c16ed66c by taoke

企业云账号密码配置化

parent 8cb294fa
...@@ -40,5 +40,6 @@ class BmyConfig(BaseConfig): ...@@ -40,5 +40,6 @@ class BmyConfig(BaseConfig):
defaultToken = "Basic aHpjcF93ZWI6MTIzNDU2" # 获取token 原始token defaultToken = "Basic aHpjcF93ZWI6MTIzNDU2" # 获取token 原始token
# 测试环境 # 测试环境
test_host = "http://testyun.banmago.com/api" test_host = "http://testyun.banmago.com/api"
test_name_password = {"username": "15151500000", "password": "bmy123456"}
...@@ -9,7 +9,7 @@ from common.db import RedisString ...@@ -9,7 +9,7 @@ from common.db import RedisString
from config import BmyConfig from config import BmyConfig
@pytest.fixture(scope='session') # @pytest.fixture(scope='session')
class SSOLogin(): class SSOLogin():
"""SSO登录""" """SSO登录"""
def _sso_pwd_encrypted(self, org_pwd): def _sso_pwd_encrypted(self, org_pwd):
...@@ -113,12 +113,12 @@ class BMY(): ...@@ -113,12 +113,12 @@ class BMY():
if __name__ == '__main__': if __name__ == '__main__':
# SSO登录测试 # # SSO登录测试
sso_token = SSOLogin().sso_login(url=BaseConfig.sso_url, # sso_token = SSOLogin().sso_login(url=BaseConfig.sso_url,
method='post',) # method='post',)
print(sso_token) # print(sso_token)
# BMY登录
# indata= {"username":"15150000000","password":"A123456"} indata= BmyConfig.test_name_password
# token= BMY().bmy_login(indata,getToken=False) token= BMY().bmy_login(indata,getToken=False)
# print(token) 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