# -*-coding:utf-8 -*- #
# ---------------------------------------------------------------------------
# ProjectName:   test66
# FileName:      test_auth.py
# Author:       lao_zhao
# Datetime:     2025/5/8 10:20
# Description:
# 
# ---------------------------------------------------------------------------
import allure
import pytest


class TestAuth:
    # 登录
    # 标记当前的用例被后续的用例依赖
    @allure.epic("BPM项目-场景测试")
    @allure.feature("认证接口")
    @allure.story("登录系统")
    @allure.title("正向用例")
    @allure.severity("高")
    @pytest.mark.dependency(scope="session")
    def test_login(self, req_fix):
        login_data = {"username": "admin",
                      "password": "BEYEoXxKBfk7COvpsAMhEw9laWTPr4PUoREUqe5tssyIl+omAR0uCUS5by+/Ky87hBUOvKrNQkMdHac46fInGWQ4nguGERyyG5pAfNC9rhtiM73iFU2ql2zConiIMZ8aZ9fUhSd1JK+JJnopIgUNAdpWDbG9sCnXng6HjIsD+BM="}
        login_url = 'http://36.139.193.99:8088/auth'
        res = req_fix.bpm_session.request(method="post", url=login_url, json=login_data)
        assert "超级管理员" in res.text
