Esempio n. 1
0
 def test_cpLackMaterialSub_statusPage(self, gettokenfixture, key, value):
     s = gettokenfixture
     self.log.info("缺料提报状态查询接口")
     r = SRMBase(s)
     msg = r.cpLackMaterialSub_statusPage(key, value)
     status = jsonpath.jsonpath(msg.json(), '$..status')[0]
     self.log.info("查询结果是:%s" % msg.json())
     assert status == value
Esempio n. 2
0
 def test_lackMaterial(self, gettokenfixture, key, value):
     s = gettokenfixture
     self.log.info("缺料提报删除")
     r = SRMBase(s)
     page = r.cpLackMaterialSub_statusPage(key, value)
     self.log.info("查询第一条是:%s" % page.json()["data"]["records"][0])
     lackMaterialSubId = jsonpath.jsonpath(page.json(),
                                           '$..lackMaterialSubId')[0]
     msg = r.lackMaterial(lackMaterialSubId)
     sql = "SELECT STATE FROM CP_LACK_MATERIAL_SUB " \
           "WHERE LACK_MATERIAL_SUB_ID = '%s'" % lackMaterialSubId
     state = Db_Oracle().select(sql)
     assert state["STATE"] == 0