import unittest
import paramunittest
from pycharm.interfaceTest.common import common
from pycharm.interfaceTest.common.Log import MyLog
import pycharm.interfaceTest.readConfig as readConfig
from pycharm.interfaceTest.common import configHttp as configHttp

productInfo_xls = common.get_xls("productCase.xlsx", "getProductInfo")
localReadConfig = readConfig.ReadConfig()
localConfigHttp = configHttp.ConfigHttp()


@paramunittest.parametrized(*productInfo_xls)
class ProductInfo(unittest.TestCase):
    def setParameters(self, case_name, method, token, goods_id, result, code,
                      msg):
        """
        set params
        :param case_name:
        :param method:
        :param token:
        :param goods_id:
        :param result:
        :param code:
        :param msg:
        :return:
        """
        self.case_name = str(case_name)
        self.method = str(method)
        self.token = str(token)
        self.goodsId = str(goods_id)
Exemple #2
0
import unittest
import paramunittest
import pycharm.interfaceTest.readConfig as readConfig
from pycharm.interfaceTest.common import Log as Log
from pycharm.interfaceTest.common import common
from pycharm.interfaceTest.common import configHttp as ConfigHttp

login_xls = common.get_xls("userCase.xlsx", "login")
localReadConfig = readConfig.ReadConfig()
configHttp = ConfigHttp.ConfigHttp()
info = {}


@paramunittest.parametrized(*login_xls)
class Login(unittest.TestCase):
    def setParameters(self, case_name, method, token, email, password, result,
                      code, msg):
        """
        set params
        :param case_name:
        :param method:
        :param token:
        :param email:
        :param password:
        :param result:
        :param code:
        :param msg:
        :return:
        """
        self.case_name = str(case_name)
        self.method = str(method)