test_demo_def.py
782 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# -*- coding: utf-8 -*-
# @Time : 2021/7/27 16:43
# @Author : Ljq
# @File : test_demo.py
# @Software: PyCharm
"""
测试get_carType方法
"""
import json
import unittest
from commons.scripts.readConf import rC
from commons.api import addJmsfDemo as aJ
class test_demo(unittest.TestCase):
def setUp(self) -> None:
pass
def tearDown(self) -> None:
pass
@classmethod
def setUpClass(cls) -> None:
cls.gatewayHost = rC.returnOptionsItems("host", "gatewayHost")
print("self.gatewayHost", cls.gatewayHost)
@classmethod
def tearDownClass(cls) -> None:
pass
def test_check_def(self):
res = aJ.get_carType(host=self.gatewayHost)
print(res.text)
if __name__ == "__main__":
unittest.main()