39 lines
1.2 KiB
Python
39 lines
1.2 KiB
Python
#!/usr/bin/env python
|
|
# -*- coding: utf-8 -*-
|
|
|
|
import allure
|
|
import pytest
|
|
from config.settings import ConfigHandler
|
|
from tools.yaml_data_analysis import CaseData
|
|
from tools.assert_control import Assert
|
|
from tools.request_control import RequestControl
|
|
from tools.regular_control import regular
|
|
from tools.teardown_control import TearDownHandler
|
|
import os
|
|
|
|
TestData = CaseData(os.path.join(ConfigHandler.data_path,'dm/fota/aut_wakeup.yaml')).case_process()
|
|
re_data = regular(str(TestData))
|
|
|
|
@pytest.mark.testing
|
|
@pytest.mark.prod
|
|
@allure.epic("DM系统")
|
|
@allure.feature("FOTA系统")
|
|
class TestAutWakeup:
|
|
|
|
@allure.story("一键唤醒")
|
|
@pytest.mark.parametrize('in_data', eval(re_data), ids=[i['detail'] for i in TestData])
|
|
def test_aut_wakeup(self, in_data, case_skip):
|
|
"""
|
|
:param :
|
|
:return:
|
|
"""
|
|
|
|
res = RequestControl().http_request(in_data)
|
|
TearDownHandler().teardown_handle(res)
|
|
Assert(res['assert']).assert_equality(response_data=res['response_data'],
|
|
sql_data=res['sql_data'])
|
|
|
|
|
|
if __name__ == '__main__':
|
|
pytest.main(['test_aut_wakeup.py', '-s', '-W', 'ignore:Module already imported:pytest.PytestWarning'])
|