Exemplo n.º 1
0
def init_contract_type_data():
    with allure.step("fixture前置操作:增加合同类型"):
        contract_type_id = contractType.add(name="手机出租合同",
                                            code="SJ20200927005")["_id"]
        yield contract_type_id
        with allure.step("fixture后置操作:删除合同类型"):
            contractType.delete(contract_type_id)
Exemplo n.º 2
0
 def test_tc002092(self):
     ret_list_contract_type_before = contractType.list(self.payload)
     contractType.delete("test_midify")
     ret_list_contract_type_after = contractType.list(self.payload)
     assert ret_list_contract_type_before == ret_list_contract_type_after
Exemplo n.º 3
0
 def after_tc002002(self):
     yield
     with allure.step("后置操作:删除创建的合同类型"):
         contractType.delete(self.ret_add_contract_type["_id"])
Exemplo n.º 4
0
 def test_tc002091(self, before_tc002091):
     contract_type_id = before_tc002091
     with allure.step("删除合同类型"):
         contractType.delete(contract_type_id)
         print(contractType.list(self.payload))
         assert contractType.list(self.payload) == []