def test_04002_second_purchase_case(self):
     """第二次采购(后选供应商)"""
     self.login_action()
     purchase = PurchaseBusiness(self.driver)
     purchase.pruchase_action(goodname1="测试商品8号",
                              goodnum=1,
                              supplier_name="李洲全供应商1")
     purchase_information = purchase.get_purchase_information()
     purchase_order_num = purchase_information["purchase_order_num"]
     ReadData().write_data('product_purchase_order', 'num2',
                           purchase_order_num)
     self.assertTrue(purchase_information["status"])
 def test_04006_second_purchase_case(self):
     """默认结算账号(微信支付账户)"""
     self.login_action()
     purchase = PurchaseBusiness(self.driver)
     purchase.pruchase_action(goodname1="测试商品8号",
                              goodnum=1,
                              supplier_name="李洲全供应商1",
                              settlement="微信支付账户")
     purchase_information = purchase.get_purchase_information()
     purchase_order_num = purchase_information["purchase_order_num"]
     ReadData().write_data('product_purchase_order', 'num6',
                           purchase_order_num)
     self.assertTrue(purchase_information["status"])
 def test_04008_purchase_multiple_goods_case(self):
     """采购多种商品"""
     self.login_action()
     purchase = PurchaseBusiness(self.driver)
     purchase.pruchase_action(goodname1="测试商品8号",
                              goodname2="测试商品3号",
                              goodnum=1,
                              supplier_name="李洲全供应商1")
     purchase_information = purchase.get_purchase_information()
     purchase_order_num = purchase_information["purchase_order_num"]
     ReadData().write_data('product_purchase_order', 'num8',
                           purchase_order_num)
     self.assertTrue(purchase_information["status"])
 def test_04009_purchase_modfiy_price_case(self):
     """采购进货修改价格采购成功"""
     self.login_action()
     purchase = PurchaseBusiness(self.driver)
     purchase.pruchase_action(goodname1="测试商品8号",
                              goodnum=1,
                              supplier_name="李洲全供应商1",
                              price="30")
     purchase_information = purchase.get_purchase_information()
     purchase_order_num = purchase_information["purchase_order_num"]
     ReadData().write_data('product_purchase_order', 'num9',
                           purchase_order_num)
     # 判断采购是否正常,采购单单号是否一致,商品库存是否增加
     self.assertTrue(purchase_information["status"])
     self.assertEqual(purchase_information["price"], r'¥30.00')
 def test_04007_purchase_multiple_goods_case(self):
     """有备注的采购单"""
     self.login_action()
     purchase = PurchaseBusiness(self.driver)
     purchase.pruchase_action(goodname1="测试商品8号",
                              goodnum=1,
                              supplier_name="李洲全供应商1",
                              price="30",
                              remark="采购商品备注")
     purchase_information = purchase.get_purchase_information()
     purchase_order_num = purchase_information["purchase_order_num"]
     ReadData().write_data('product_purchase_order', 'num7',
                           purchase_order_num)
     # 判断采购是否正常,采购单单号是否一致,商品库存是否增加
     self.assertTrue(purchase_information["status"])