Пример #1
0
 def test_checkTraderAccount(self, userLogin, send_data, expect):
     """查找商家"""
     re = Trader(userLogin).getTraderListData(send_data['parkName'],
                                              send_data['traderName'])
     result = re
     self.save_data('traderAccount', result[0]['account'])
     Assertions().assert_in_text(result, expect["traderAccountMsg"])
Пример #2
0
 def test_traderSell(self, userLogin, send_data, expect):
     """商家售卖"""
     re = Trader(userLogin).addSell(send_data['parkName'],
                                    send_data['traderName'],
                                    send_data['couponName'])
     result = re
     Assertions().assert_in_text(result, expect["traderSellMsg"])
Пример #3
0
 def test_editTraderPwd(self, userLogin, send_data, expect):
     """修改密码"""
     re = Trader(userLogin).editTrader(send_data['name'], send_data['name'],
                                       send_data['parkName'],
                                       send_data['editPwd'])
     result = re
     self.save_data('editPwd', send_data['editPwd'])
     Assertions().assert_in_text(result, expect["editTraderPwdMsg"])
Пример #4
0
 def test_editTrader(self, userLogin, send_data, expect):
     """商户编辑"""
     re = Trader(userLogin).editTrader(send_data['name'],
                                       send_data["editName"],
                                       send_data['parkName'])
     result = re
     self.save_data('editName', send_data["editName"])
     Assertions().assert_in_text(result, expect["editTraderMessage"])
Пример #5
0
 def test_addTrader(self, userLogin, send_data, expect):
     """新增商户"""
     re = Trader(userLogin).addTrader(send_data["traderName"],
                                      send_data["parkName"],
                                      send_data['account'],
                                      send_data['couponName'])
     result = re
     self.save_data('account', send_data['account'])
     Assertions().assert_in_text(result, expect["addTraderMessage"])
Пример #6
0
 def test_deleteTrader(self, userLogin, send_data, expect):
     """商户删除"""
     re = Trader(userLogin).deleteTrader(send_data['parkName'],
                                         send_data["name"])
     result = re
     Assertions().assert_in_text(result, expect["deleteTraderMessage"])
Пример #7
0
 def test_checkDeleteTrader(self, userLogin, send_data, expect):
     """查看已删除商户是否存在"""
     re = Trader(userLogin).getTraderListData(send_data['parkName'],
                                              send_data["editName"])
     result = re
     Assertions().assert_not_in_text(result, expect["checkDeleteTraderMsg"])
Пример #8
0
 def test_checkEditTrader(self, userLogin, send_data, expect):
     """查看修改后商户"""
     re = Trader(userLogin).getTraderListData(send_data["parkName"],
                                              send_data["editName"])
     result = re
     Assertions().assert_in_text(result, expect["checkEditTraderMessage"])