Exemplo n.º 1
0
import unittest
from ddt import ddt, data
from d2020_07_01.common.myconfig import cnf
from d2020_07_01.common.mylog import logger
from d2020_07_01.common.EnvData import *
from d2020_07_01.common.read_excel import ReadExcel
from d2020_07_01.common.load_path import load_data_path
from d2020_07_01.common.handle_phone import *
from d2020_07_01.common.handle_request import MyRequest
import json
from d2020_07_01.common.handle_db import HandleDb
from decimal import *

sheet_name = cnf.read_section_to_dict("EXCEL")['invest']
datas = ReadExcel(load_data_path, sheet_name).load_data()
db = HandleDb()


@ddt
class TestInvest(unittest.TestCase):
    '投资类用例'

    @classmethod
    def setUpClass(cls):
        logger.info('========  start ============》开始执行{}类下的用例'.format(
            cls.__name__))
        clear_Envdata_attr()
        cls.count = 0

    @classmethod
Exemplo n.º 2
0
 def setUp(self):
     logger.info(">" * 50)
     self.__class__.count += 1
     logger.info("开始第>》》》   {}    《《《<条执行用例".format(self.__class__.count))
     self.t = ReadExcel(load_data_path, sheet_name)
Exemplo n.º 3
0
 def setUp(self):
     self.__class__.count += 1
     logger.info("---------->开始执行第{}条测试用例-----------------".format(
         self.__class__.count))
     self.t = ReadExcel(load_data_path, sheet_name)