test_Delete_integration_level.py 1.25 KB
import unittest
from atdd.PcApiTest import PcApiTest
from tests.Integral.IntergalPC.test_jobLevel import jobLevel

# 删除积分等级接口
class DeletelevelTest(PcApiTest):
    def setUp(self):
        self.do_login(self.host, self.mobile, self.psw, self.domain)

    # 先创建角色,在删除:delete专用勿删
    def test_save_role(self):
        interfaceUrl = "/Integral/Apicp/Level/List"
        data = {
            "eilType": 1,
            "eilObjId": "C371F6BD7F0000017B20C6107916D763"
        }
        result = self.PcApiTest(interfaceUrl, data)
        print(self.host + "/" + self.domain + interfaceUrl)
        print(result)
        return result

    # # 删除岗位
    # def test_delete_job(self):
    #     interfaceUrl = "/Integral/Apicp/Level/Delete"
    #     resultJobLevel = jobLevel().test_levelList_job()
    #     listJobLevel = resultJobLevel['result']['list']
    #     self.assertNotEquals(2, len(listJobLevel))
    #     lastJobEIlId = listJobLevel[len(listJobLevel) - 1]['eilId']  # 最后一个岗位的等级ID
    #
    #     data = {
    #         "eilId": lastJobEIlId
    #     }
    #     result = self.PcApiTest(interfaceUrl, data)
    #     print(result)
    #     return result

if __name__ == '__main__':
    unittest.main()