def test_cpLackMaterialSub_add(self, gettokenfixture, processamento):
     s = gettokenfixture
     self.log.info("缺料提报新增")
     r = SRMBase(s)
     msg = r.cpLackMaterialSub_add(processamento)
     ass = r.cpLackMaterialSub_qlpage("productName", msg[1])
     ass_processamento = jsonpath.jsonpath(ass.json(),
                                           '$..processamento')[0]
     assert ass_processamento == processamento
 def test_cpLackMaterialSub_EditSave(self, gettokenfixture, processamento):
     s = gettokenfixture
     self.log.info("缺料提报编辑保存")
     r = SRMBase(s)
     msg = r.cpLackMaterialSub_EditSave(processamento)
     page = r.cpLackMaterialSub_qlpage("productName",
                                       "3e316193-33d7-4dbe-b161")
     ass_processamento = jsonpath.jsonpath(page.json(),
                                           '$..processamento')[0]
     assert msg.json()["success"] == 1
     assert ass_processamento == processamento
 def test_cpLackMaterialSub_statusPage(self, gettokenfixture, key, value):
     s = gettokenfixture
     self.log.info("缺料提报查询接口")
     r = SRMBase(s)
     msg = r.cpLackMaterialSub_qlpage(key, value)
     lackMaterialSubNo = jsonpath.jsonpath(msg.json(),
                                           '$..lackMaterialSubNo')[0]
     materialCode = jsonpath.jsonpath(msg.json(), '$..materialCode')[0]
     createBy = jsonpath.jsonpath(msg.json(), '$..createBy')[0]
     self.log.info("查询结果是:%s" % msg.json())
     if key == "lackMaterialSubNo":
         assert lackMaterialSubNo == value
     elif key == "materialCode":
         assert materialCode == value
     else:
         assert createBy == value