test_demo_def.py 782 Bytes
# -*- 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()