Ejemplo n.º 1
0
def token():
    params = {"username": "******", "password": "******"}
    result = start_run_case(Login, 0, ("status_code", 200, "GTE"), json=params)
    auth = {
        "Authorization": f'JWT {result["body"]["data"]["token"]}'
    }
    yield auth
Ejemplo n.º 2
0
 def test_login(self):
     username = "******"
     password = "******"
     md5_pwd = String().transfer_md5(str(password))
     params = {
         'username': username,
         'password': md5_pwd,
     }
     result = start_run_case(Login, "用户登录", data=params)
     print(result)
Ejemplo n.º 3
0
 def test_delete(self, token):
     start_run_case(Login,
                    "删除",
                    session_connection=token,
                    url_converter="58")
Ejemplo n.º 4
0
 def test_get(self, token):
     params = {"page": 1, "size": 20}
     start_run_case(Login, "查询", session_connection=token, params=params)