Exemplo n.º 1
0
import unittest
from parameterized import parameterized

from woniuboss2.lib.backstage_manage import Backstage
from woniuboss2.tools.utility import Utility

data_config_info = Utility.get_json('..\\config\\testdata.conf')
test_addrole_info = Utility.get_excel_to_tuple(data_config_info[5])
test_queryuser_info = Utility.get_excel_to_tuple(data_config_info[6])


class BackstageTest(unittest.TestCase):
    def setUp(self):
        self.backstage = Backstage()

    def tearDown(self):
        pass

    @parameterized.expand(test_addrole_info)
    def test_add_role(self, add_role_url, post, add_role_data, status_code,
                      content):
        add_role_resp = self.backstage.add_role(add_role_url, add_role_data)
        self.assertEqual(add_role_resp.text, content)

    # 查询0条,查询1条,查询所有
    @parameterized.expand(test_queryuser_info)
    def test_queryuser(self, query_user_url, post, query_user_data,
                       status_code, content):
        queryuser_resp = self.backstage.query_user(query_user_url,
                                                   query_user_data)
        sql_all = 'select count(id) from system_user'
Exemplo n.º 2
0
import unittest
from parameterized import parameterized

from woniuboss2.lib.hr_manage import Hr
from woniuboss2.tools.utility import Utility

data_config_info = Utility.get_json('..\\config\\testdata.conf')
test_addstaff_info = Utility.get_excel_to_tuple(data_config_info[2])
test_querystaff_info = Utility.get_excel_to_tuple(data_config_info[3])
test_editstaff_info = Utility.get_excel_to_tuple(data_config_info[4])


class HrTest(unittest.TestCase):
    def setUp(self):
        self.hr = Hr()

    def tearDown(self):
        pass

    @parameterized.expand(test_addstaff_info)
    def test_addstaff(self, add_staff_url, post, add_staff_data, status_code,
                      content):
        addstaff_resp = self.hr.add_staff(add_staff_url, add_staff_data)
        self.assertEqual(addstaff_resp.text, content)

    #查询0条,查询1条,查询部分,查询所有
    @parameterized.expand(test_querystaff_info)
    def test_querystaff(self, query_staff_url, post, query_staff_data,
                        status_code, content):
        querystaff_resp = self.hr.query_staff(query_staff_url,
                                              query_staff_data)
Exemplo n.º 3
0
from woniuboss2.lib.student import Student
from woniuboss2.tools.utility import Utility
import unittest
from parameterized import parameterized

data_config_info = Utility.get_json('..\\config\\testdata.conf')
test_queryStudentInfo_info = Utility.get_excel_to_tuple(data_config_info[1])
test_selectInfo_info = Utility.get_excel_to_tuple(data_config_info[2])
test_saveNewInfo_info = Utility.get_excel_to_tuple(data_config_info[3])
test_saveLeave_info = Utility.get_excel_to_tuple(data_config_info[4])
test_saveModLeave_info = Utility.get_excel_to_tuple(data_config_info[5])
test_terminateLeave_info = Utility.get_excel_to_tuple(data_config_info[6])
test_queryLeave_info = Utility.get_excel_to_tuple(data_config_info[7])
test_saveUpLeave_info = Utility.get_excel_to_tuple(data_config_info[8])
test_quertAtteResult_info = Utility.get_excel_to_tuple(data_config_info[9])
# test_queryPhaseExam_info=Utility.get_excel_to_tuple(data_config_info[10])
test_saveScore_info = Utility.get_excel_to_tuple(data_config_info[11])
test_updateRepeat_info = Utility.get_excel_to_tuple(data_config_info[12])
test_showPhaseExam_info = Utility.get_excel_to_tuple(data_config_info[13])
test_queryStuOfClass_info = Utility.get_excel_to_tuple(data_config_info[14])
test_allocate_info = Utility.get_excel_to_tuple(data_config_info[15])
# test_saveCourse_info=Utility.get_excel_to_tuple(data_config_info[16])
test_saveModifyCourse_info = Utility.get_excel_to_tuple(data_config_info[17])


class StudentTest(unittest.TestCase):
    def setUp(self) -> None:
        self.student = Student()
        print('test start')

    def tearDown(self) -> None:
import unittest
from parameterized import parameterized
from woniuboss2.lib.financial_manage import Finance
from woniuboss2.tools.utility import Utility

data_config_info = Utility.get_json('..\\config\\testdata.conf')
test_addflow_info = Utility.get_excel_to_tuple(data_config_info[1])
test_queryflow_info = Utility.get_excel_to_tuple(data_config_info[7])
test_editflow_info = Utility.get_excel_to_tuple(data_config_info[8])


class FinancialTest(unittest.TestCase):
    def setUp(self):
        self.finance = Finance()

    def tearDown(self):
        pass

    @parameterized.expand(test_addflow_info)
    def test_addflow(self, addflow_url, post, addflow_data, status_code,
                     content):
        addflow_resp = self.finance.add_flow(addflow_url, addflow_data)
        self.assertEqual(addflow_resp.text, content)

    # 按条件查询
    @parameterized.expand(test_queryflow_info)
    def test_querflow(self, query_flow_url, post, query_flow_data, status_code,
                      content):
        queryflow_resp = self.finance.query_flow(query_flow_url,
                                                 query_flow_data)
        sql_part01 = 'select count(detailed_id) from detailed_dealings where trading_time between "2018-05-29" and "2018-05-31"'
#!/usr/bin/env python
# -*- coding:utf-8 -*-
#====#====#====#====
#Author:
#CreatDate:
#Version:
#====#====#====#====
import unittest
from parameterized import parameterized
from woniuboss2.tools.utility import Utility
from woniuboss2.lib.training import Tran
# 获取测试数据
data_config_info = Utility.get_json('..\\config\\testdata.conf')
query_message_info = Utility.get_excel_to_tuple(data_config_info[1])
query_resume_info = Utility.get_excel_to_tuple(data_config_info[2])
Track_resources_info = Utility.get_excel_to_tuple(data_config_info[3])
Modify_information_info = Utility.get_excel_to_tuple(data_config_info[4])
add_information_info = Utility.get_excel_to_tuple(data_config_info[5])
transfer_query_info = Utility.get_excel_to_tuple(data_config_info[6])
transfer_view_info = Utility.get_excel_to_tuple(data_config_info[7])
transfer_commit_info = Utility.get_excel_to_tuple(data_config_info[8])
distribution_query_info = Utility.get_excel_to_tuple(data_config_info[9])
Proportionate_distribution_info = Utility.get_excel_to_tuple(
    data_config_info[10])
Public_query_info = Utility.get_excel_to_tuple(data_config_info[11])
Public_claim_info = Utility.get_excel_to_tuple(data_config_info[12])


class TestTrain(unittest.TestCase):
    def setUp(self):
        def setUp(self):
Exemplo n.º 6
0
#!/usr/bin/env python
# -*- coding:utf-8 -*-
#====#====#====#====
#Author:
#CreatDate:
#Version:
#====#====#====#====
from woniuboss2.tools.utility import Utility
from woniuboss2.lib.employment import Employment
import unittest
from parameterized import parameterized

# 获取测试数据
data_config_info = Utility.get_json('..\\config\\testdata.conf')
#技术面试
test_Interview_info = Utility.get_excel_to_tuple(data_config_info[19])
#就业管理
test_obtainEmployment_info = Utility.get_excel_to_tuple(data_config_info[20])


class TestEmployment(unittest.TestCase):
    def setUp(self):
        print("test start")

    def tearDown(self):
        print("test end")

    # 技术面试
    @parameterized.expand(test_Interview_info)
    def test_Interview(self, Interview_url, post, Interview_data, status_code,
                       content):
Exemplo n.º 7
0
# -*- coding:utf-8 -*-
#====#====#====#====
#Author:
#CreatDate:
#Version:
#====#====#====#====
from woniuboss2.tools.utility import Utility
from woniuboss2.lib.finance import Finance
import unittest
from parameterized import parameterized

# 获取测试数据
data_config_info = Utility.get_json('..\\config\\testdata.conf')

#新增流水
test_addFinancial_info = Utility.get_excel_to_tuple(data_config_info[13])
#上月查询
test_Query_lastmonth_info = Utility.get_excel_to_tuple(data_config_info[14])
#本月查询
test_Query_thismonth_info = Utility.get_excel_to_tuple(data_config_info[15])
#学员缴费
test_studentpayment_info = Utility.get_excel_to_tuple(data_config_info[16])


class TestFinance(unittest.TestCase):
    def setUp(self):
        print("test start")

    def tearDown(self):
        print("test end")
Exemplo n.º 8
0
from woniuboss2.tools.utility import Utility
from woniuboss2.lib.market import Market
import unittest
from parameterized import parameterized

# 获取测试数据
data_config_info = Utility.get_json('..\\config\\testdata.conf')
# 查询资源
test_qureyNetCus_info = Utility.get_excel_to_tuple(data_config_info[18])
# 新增资源
test_addCus_info = Utility.get_excel_to_tuple(data_config_info[19])
# 上传简历
test_validateUpload_info = Utility.get_excel_to_tuple(data_config_info[20])


class TestMarket(unittest.TestCase):
    def setUp(self):
        print("test start")

    def tearDown(self):
        print("test end")

    # 新增资源
    @parameterized.expand(test_addCus_info)
    def test_addCus(self, addCus_url, post, addCus_data, status_code, content):
        market_add_resp = Market().addCus(addCus_url, addCus_data)
        actual = market_add_resp
        # 断言
        self.assertEqual(actual, content)

    # 上传简历
Exemplo n.º 9
0
#====#====#====#====
#Author:
#CreatDate:
#Version:
#====#====#====#====
import json
import unittest
from parameterized import parameterized

from woniuboss2.lib.enterprise import EtprsManage
from woniuboss2.tools.utility import Utility

# 获取测试数据
data_config_info = Utility.get_json('..\\config\\testdata.conf')
#新增企业
test_add_company_info = Utility.get_excel_to_tuple(data_config_info[17])
#查询企业
test_query_etprs_info = Utility.get_excel_to_tuple(data_config_info[18])


class TestEnterprise(unittest.TestCase):
    def setUp(self):
        print("test start")

    def tearDown(self):
        print("test end")

    # 新增企业
    @parameterized.expand(test_add_company_info)
    def test_add_company(self, add_company_url, post, add_company_data,
                         status_code, content):