Arthur-Wu committed this file on 2024-11-18
This commit is contained in:
parent
61d92d5036
commit
875fad5324
@ -63,13 +63,13 @@ class YMClientApi(object):
|
||||
logging.info(f"-----------接口返回数据:{response.json()}\n\n")
|
||||
return response.json()
|
||||
|
||||
def add_retire_purchase(self, GoodsInfoData, LoginData):
|
||||
def add_retire_purchase(self, GoodsInfoData, AddPurchaseQuantity, LoginData):
|
||||
logging.info("========== [加入购物车] add_retire_purchase ==========")
|
||||
payload = json.dumps({
|
||||
"addGoods":[{
|
||||
"inputCode": GoodsInfoData["data"]["inputCode"],
|
||||
"isNormalAddPurchase": True,
|
||||
"qty": GoodsInfoData["data"]["qty"],
|
||||
"qty": int(AddPurchaseQuantity), # AddPurchaseQuantity,GoodsInfoData["data"]["qty"]
|
||||
"weight": int(GoodsInfoData["data"]["weight"]),
|
||||
}],
|
||||
"autoSelectCoupon": True,
|
||||
@ -146,11 +146,8 @@ class YMClientApi(object):
|
||||
POST
|
||||
https://api.test.yimaogo.com/cart/v2/shopping/add/retire/purchase
|
||||
|
||||
payload = {"addGoods":[{"inputCode":"6942728414063","isNormalAddPurchase":true,"qty":1,"weight":0}],"autoSelectCoupon":true,"coupons":[],"deleteGoods":[],"existGoods":[],"orderNo":"1857003957307801600"}
|
||||
'''
|
||||
|
||||
|
||||
|
||||
''' 2- without sessionid '''
|
||||
def get_ads_list(self):
|
||||
logging.info("========== [获取广告列表] get_ads_list ==========")
|
||||
@ -174,25 +171,23 @@ class YMClientApi(object):
|
||||
return response.json()
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
ym = YMClientApi()
|
||||
ymc = YMClientApi()
|
||||
''' 01- '''
|
||||
ym.session_start() # step1:session开始
|
||||
ymc.session_start() # step1:session开始
|
||||
Payload01 = {"action": 0, "isAnon": True}
|
||||
LoginData = ym.login_app_v2(Payload01) # step2:匿名登录
|
||||
ym.get_login_type() # step3:获取登录方式
|
||||
LoginData = ymc.login_app_v2(Payload01) # step2:匿名登录
|
||||
|
||||
ymc.get_login_type() # step3:获取登录方式
|
||||
Payload02 = {"action": 1, "code": "18052753212", "isAnon": False}
|
||||
ym.login_app_v2(Payload02) # step4:切换会员登录
|
||||
GoodsInfoData = ym.get_goods_info(InputCode=6924882486100) # step5:获取商品信息
|
||||
CouponListData = ym.get_coupon_list() # step6:获取优惠券列表
|
||||
ym.receive_coupon(CouponListData) # step7:领取优惠券
|
||||
ym.query_coupon_list_user() # step8:查询用户持有的优惠券列表
|
||||
ym.add_retire_purchase(GoodsInfoData, LoginData) # step9:加购商品
|
||||
ym.get_cart_goods_info(GoodsInfoData) # step10:获取购物车商品信息
|
||||
ym.request_order_settlement(LoginData) # step11:请求订单结算
|
||||
ymc.login_app_v2(Payload02) # step4:切换会员登录
|
||||
GoodsInfoData = ymc.get_goods_info(InputCode=6924882486100) # step5:获取商品信息 ------ 6924882486100
|
||||
CouponListData = ymc.get_coupon_list() # step6:获取优惠券列表
|
||||
ymc.receive_coupon(CouponListData) # step7:领取优惠券
|
||||
ymc.query_coupon_list_user() # step8:查询用户持有的优惠券列表
|
||||
ymc.add_retire_purchase(GoodsInfoData, 1, LoginData) # step9:加购商品 ------ 6924882486100
|
||||
ymc.get_cart_goods_info(GoodsInfoData) # step10:获取购物车商品信息
|
||||
ymc.request_order_settlement(LoginData) # step11:请求订单结算
|
||||
|
||||
ym.session_end()
|
||||
ymc.session_end()
|
||||
|
||||
|
Binary file not shown.
@ -0,0 +1,5 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -0,0 +1,5 @@
|
||||
# !/usr/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
# @Author:: Arthur Wu
|
||||
# @Description:: 游客登录,加购多件商品,并结算
|
||||
# @Date:: 2021-05-10 16:30:23
|
@ -0,0 +1,5 @@
|
||||
# !/usr/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
# @Author:: Arthur Wu
|
||||
# @Description:: 游客登录,加购打折商品,并结算
|
||||
# @Date:: 2021-05-10 16:30:22
|
@ -0,0 +1,5 @@
|
||||
# !/usr/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
# @Author:: Arthur Wu
|
||||
# @Description:: 游客登录,加购促销白名单商品,并结算
|
||||
# @Date:: 2021-05-10 16:30:23
|
5
YiMao/debugLib/test_C008_NonVipAddWeightToTheProduct.py
Normal file
5
YiMao/debugLib/test_C008_NonVipAddWeightToTheProduct.py
Normal file
@ -0,0 +1,5 @@
|
||||
# !/usr/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
# @Author:: Arthur Wu
|
||||
# @Description:: 游客登录,加购重量放通商品,并结算
|
||||
# @Date:: 2021-05-10 16:30:22
|
5
YiMao/debugLib/test_C009_NonVipReturnShoppingBag.py
Normal file
5
YiMao/debugLib/test_C009_NonVipReturnShoppingBag.py
Normal file
@ -0,0 +1,5 @@
|
||||
# !/usr/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
# @Author:: Arthur Wu
|
||||
# @Description:: 游客登录,加购2个购物袋,退购一个购物袋,并结算
|
||||
# @Date:: 2021-05-10 16:30:22
|
@ -0,0 +1,5 @@
|
||||
# !/usr/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
# @Author:: Arthur Wu
|
||||
# @Description:: 游客登录,加购2个普通商品,退购一个,并结算
|
||||
# @Date:: 2021-05-10 16:00:00
|
5
YiMao/debugLib/test_C011_NonVipReturnOfMemberProducts.py
Normal file
5
YiMao/debugLib/test_C011_NonVipReturnOfMemberProducts.py
Normal file
@ -0,0 +1,5 @@
|
||||
# !/usr/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
# @Author:: Arthur Wu
|
||||
# @Description:: 游客登录,加购2个会员商品,退购一个,并结算
|
||||
# @Date:: 2021-05-10 16:27:22
|
@ -0,0 +1,5 @@
|
||||
# !/usr/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
# @Author:: Arthur Wu
|
||||
# @Description:: 游客登录,加购多件商品,退购一个商品,并结算
|
||||
# @Date:: 2021-05-10 16:30:23
|
@ -0,0 +1,5 @@
|
||||
# !/usr/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
# @Author:: Arthur Wu
|
||||
# @Description:: 游客登录,加购2个打折商品,退购一个,并结算
|
||||
# @Date:: 2021-05-10 16:30:22
|
@ -0,0 +1,5 @@
|
||||
# !/usr/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
# @Author:: Arthur Wu
|
||||
# @Description:: 游客登录,加购2个促销白名单商品,退购一个,并结算
|
||||
# @Date:: 2021-05-10 16:00:00
|
@ -0,0 +1,5 @@
|
||||
# !/usr/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
# @Author:: Arthur Wu
|
||||
# @Description:: 游客登录,加购2个重量放通商品,退购一个,并结算
|
||||
# @Date:: 2021/04/01 16:00:00
|
@ -0,0 +1,5 @@
|
||||
# !/usr/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
# @Author:: Arthur Wu
|
||||
# @Description:: 游客转会员登录,加购购物袋,并结算
|
||||
# @Date:: 2021-05-10 16:30:22
|
@ -0,0 +1,4 @@
|
||||
# !/usr/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
# @Author:: Arthur Wu
|
||||
# @Description:: 游客转会员登录,加购普通商品,并结算
|
@ -0,0 +1,5 @@
|
||||
# !/usr/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
# @Author:: Arthur Wu
|
||||
# @Description:: 游客转会员登录,加购会员商品,并结算
|
||||
# @Date:: 2021-05-10 16:30:23
|
@ -0,0 +1,5 @@
|
||||
# !/usr/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
# @Author:: Arthur Wu
|
||||
# @Description:: 游客转会员登录,加购多件商品,并结算
|
||||
# @Date:: 2021-05-10 16:30:23
|
@ -0,0 +1,5 @@
|
||||
# !/usr/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
# @Author:: Arthur Wu
|
||||
# @Description:: 游客转会员登录,加购打折商品,并结算
|
||||
# @Date:: 2021-05-10 16:30:23
|
@ -0,0 +1,5 @@
|
||||
# !/usr/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
# @Author:: Arthur Wu
|
||||
# @Description:: 游客转会员登录,加购促销白名单商品,并结算
|
||||
# @Date:: 2021-05-10 16:30:22
|
@ -0,0 +1,4 @@
|
||||
# !/usr/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
# @Author:: Arthur Wu
|
||||
# @Description:: 游客转会员登录,加购重量放通商品,并结算
|
5
YiMao/debugLib/test_C023_NonToVipReturnShoppingBag.py
Normal file
5
YiMao/debugLib/test_C023_NonToVipReturnShoppingBag.py
Normal file
@ -0,0 +1,5 @@
|
||||
# !/usr/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
# @Author:: Arthur Wu
|
||||
# @Description:: 游客转会员登录,加购2个购物袋,退购一个购物袋,并结算
|
||||
# @Date:: 2021-05-10 15:30:27
|
@ -0,0 +1,5 @@
|
||||
# !/usr/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
# @Author:: Arthur Wu
|
||||
# @Description:: 游客转会员登录,加购2个普通商品,退购一个,并结算
|
||||
# @Date:: 2021-05-10 15:30:27
|
@ -0,0 +1,5 @@
|
||||
# !/usr/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
# @Author:: Arthur Wu
|
||||
# @Description:: 游客转会员登录,加购2个会员商品,退购一个,并结算
|
||||
# @Date:: 2021-05-10 15:30:27
|
@ -0,0 +1,4 @@
|
||||
# !/usr/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
# @Author:: Arthur Wu
|
||||
# @Description:: 游客转会员登录,加购多件商品,退购一个商品,并结算
|
@ -0,0 +1,5 @@
|
||||
# !/usr/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
# @Author:: Arthur Wu
|
||||
# @Description:: 游客转会员登录,加购2个打折商品,退购一个,并结算
|
||||
# @Date:: 2021-05-10 15:30:22
|
@ -0,0 +1,5 @@
|
||||
# !/usr/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
# @Author:: Arthur Wu
|
||||
# @Description:: 游客转会员登录,加购2个促销白名单商品,退购一个,并结算
|
||||
# @Date:: 2021-05-10 16:30:22
|
@ -0,0 +1,5 @@
|
||||
# !/usr/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
# @Author:: Arthur Wu
|
||||
# @Description:: 游客转会员登录,加购2个重量放通商品,退购一个,并结算
|
||||
# @Date:: 2021-05-10 15:30:23
|
4
YiMao/debugLib/test_C030_VipReceiveCoupon.py
Normal file
4
YiMao/debugLib/test_C030_VipReceiveCoupon.py
Normal file
@ -0,0 +1,4 @@
|
||||
# !/usr/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
# @Author:: Arthur Wu
|
||||
# @Description:: 会员登录,领取优惠券
|
@ -0,0 +1,5 @@
|
||||
# !/usr/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
# @Author:: Arthur Wu
|
||||
# @Description:: 会员登录,加购普通商品,并结算
|
||||
# @Date:: 2021-05-10 15:30:22
|
@ -0,0 +1,4 @@
|
||||
# !/usr/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
# @Author:: Arthur Wu
|
||||
# @Description:: 会员登录,加购会员商品,并结算
|
@ -0,0 +1,5 @@
|
||||
# !/usr/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
# @Author:: Arthur Wu
|
||||
# @Description:: 会员登录,加购多件商品,并结算
|
||||
# @Date:: 2021-05-10 15:40:32
|
@ -0,0 +1,5 @@
|
||||
# !/usr/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
# @Author:: Arthur Wu
|
||||
# @Description:: 会员登录,加购打折商品,并结算
|
||||
# @Date:: 2021-05-10 16:00:00
|
@ -0,0 +1,5 @@
|
||||
# !/usr/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
# @Author:: Arthur Wu
|
||||
# @Description:: 会员登录,加购促销白名单商品,并结算
|
||||
# @Date:: 2021-05-10 16:30:22
|
5
YiMao/debugLib/test_C037_VipAddWeightToTheProduct.py
Normal file
5
YiMao/debugLib/test_C037_VipAddWeightToTheProduct.py
Normal file
@ -0,0 +1,5 @@
|
||||
# !/usr/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
# @Author:: Arthur Wu
|
||||
# @Description:: 会员登录,加购重量放通商品,并结算
|
||||
# @Date:: 2021-05-10 15:30:22
|
5
YiMao/debugLib/test_C038_VipReturnShoppingBag.py
Normal file
5
YiMao/debugLib/test_C038_VipReturnShoppingBag.py
Normal file
@ -0,0 +1,5 @@
|
||||
# !/usr/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
# @Author:: Arthur Wu
|
||||
# @Description:: 会员登录,加购2个购物袋,退购一个购物袋,并结算
|
||||
# @Date:: 2021-05-20 15:30:23
|
@ -0,0 +1,5 @@
|
||||
# !/usr/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
# @Author:: Arthur Wu
|
||||
# @Description:: 会员登录,加购2个普通商品,退购一个,并结算
|
||||
# @Date:: 2021-05-10 15:30:22
|
5
YiMao/debugLib/test_C040_VipReturnOfMemberProducts.py
Normal file
5
YiMao/debugLib/test_C040_VipReturnOfMemberProducts.py
Normal file
@ -0,0 +1,5 @@
|
||||
# !/usr/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
# @Author:: Arthur Wu
|
||||
# @Description:: 会员登录,加购2个会员商品,退购一个,并结算
|
||||
# @Date:: 2021-05-10 16:30:23
|
@ -0,0 +1,4 @@
|
||||
# !/usr/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
# @Author:: Arthur Wu
|
||||
# @Description:: 会员登录,加购多件商品,退购一个商品,并结算
|
@ -0,0 +1,5 @@
|
||||
# !/usr/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
# @Author:: Arthur Wu
|
||||
# @Description:: 会员登录,加购2个打折商品,退购一个,并结算
|
||||
# @Date:: 2021-05-10 15:30:22
|
@ -0,0 +1,5 @@
|
||||
# !/usr/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
# @Author:: Arthur Wu
|
||||
# @Description:: 会员登录,加购2个促销白名单商品,退购一个,并结算
|
||||
# @Date:: 2021-05-10 16:30:23
|
5
YiMao/debugLib/test_C044_VipReturnWeightOfTheProducte.py
Normal file
5
YiMao/debugLib/test_C044_VipReturnWeightOfTheProducte.py
Normal file
@ -0,0 +1,5 @@
|
||||
# !/usr/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
# @Author:: Arthur Wu
|
||||
# @Description:: 会员登录,加购2个重量放通商品,退购一个,并结算
|
||||
# @Date:: 2021-05-10 16:30:22
|
5
YiMao/scripts/BusiScenarios/__init__.py
Normal file
5
YiMao/scripts/BusiScenarios/__init__.py
Normal file
@ -0,0 +1,5 @@
|
||||
# !/usr/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
# @Author:: Arthur Wu
|
||||
# @Date:: 2024/11/18-11:49
|
||||
# @Description::
|
@ -0,0 +1,59 @@
|
||||
# !/usr/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
# @Author:: Arthur Wu
|
||||
# @Date:: 2024/11/18-9:38
|
||||
# @Description::
|
||||
import unittest,allure,time
|
||||
from configs.globalObj import LOGGER
|
||||
from YiMao.businessFunc.ClientApiLib import YMClientApi
|
||||
|
||||
|
||||
class Test_C002_AddShoppingBagAndSettlePayment(unittest.TestCase):
|
||||
'''@Date:: 2024/11/15
|
||||
@Author:: Arthur Wu
|
||||
@Desc::
|
||||
[购物车客户端] 加购购物袋并试算验证
|
||||
1、武商测试环境,购物袋inputcode为:
|
||||
6971648922990、6971648922983
|
||||
'''
|
||||
def setUp(self) -> None:
|
||||
self.timestamp = int(time.time())
|
||||
self.ymc = YMClientApi()
|
||||
|
||||
@allure.story('[购物车客户端] 加购购物袋并试算验证-01')
|
||||
def test_C00201_AddShoppingBagAndSettlePayment(self):
|
||||
allure.dynamic.description("描述:加购中号购物袋")
|
||||
allure.step("步骤1:session开始")
|
||||
self.ymc.session_start()
|
||||
allure.step("步骤2:匿名登录")
|
||||
Payload01 = {"action": 0, "isAnon": True}
|
||||
LoginData = self.ymc.login_app_v2(Payload01)
|
||||
allure.step("步骤3:获取商品信息")
|
||||
GoodsInfoData = self.ymc.get_goods_info(InputCode=6971648922990)
|
||||
allure.step("步骤4:添加购物袋")
|
||||
self.ymc.add_retire_purchase(GoodsInfoData, 2, LoginData)
|
||||
allure.step("步骤5:获取购物车商品信息")
|
||||
self.ymc.get_cart_goods_info(GoodsInfoData)
|
||||
allure.step("步骤6:请求订单结算")
|
||||
self.ymc.request_order_settlement(LoginData)
|
||||
|
||||
@allure.story('[购物车客户端] 加购购物袋并试算验证-02')
|
||||
def test_C00202_AddShoppingBagAndSettlePayment(self):
|
||||
allure.dynamic.description("描述:加购大号购物袋")
|
||||
allure.step("步骤1:session开始")
|
||||
self.ymc.session_start()
|
||||
allure.step("步骤2:匿名登录")
|
||||
Payload01 = {"action": 0, "isAnon": True}
|
||||
LoginData = self.ymc.login_app_v2(Payload01)
|
||||
allure.step("步骤3:获取商品信息")
|
||||
GoodsInfoData = self.ymc.get_goods_info(InputCode=6971648922983)
|
||||
allure.step("步骤4:添加购物袋")
|
||||
self.ymc.add_retire_purchase(GoodsInfoData, 2, LoginData)
|
||||
allure.step("步骤5:获取购物车商品信息")
|
||||
self.ymc.get_cart_goods_info(GoodsInfoData)
|
||||
allure.step("步骤6:请求订单结算")
|
||||
self.ymc.request_order_settlement(LoginData)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main(verbosity=2)
|
@ -0,0 +1,42 @@
|
||||
# !/usr/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
# @Author:: Arthur Wu
|
||||
# @Date:: 2024/11/18-10:49
|
||||
# @Description::
|
||||
import unittest,allure,time
|
||||
from configs.globalObj import LOGGER
|
||||
from YiMao.businessFunc.ClientApiLib import YMClientApi
|
||||
|
||||
|
||||
class Test_C002_AddShoppingBagAndSettlePayment(unittest.TestCase):
|
||||
'''@Date:: 2024/11/15
|
||||
@Author:: Arthur Wu
|
||||
@Desc::
|
||||
[购物车客户端] 加购无优惠商品并试算验证
|
||||
1、武商测试环境,普通无优惠商品inputcode为:
|
||||
6924743915848
|
||||
'''
|
||||
def setUp(self) -> None:
|
||||
self.timestamp = int(time.time())
|
||||
self.ymc = YMClientApi()
|
||||
|
||||
@allure.story('[购物车客户端] 加购无优惠商品并试算验证-01')
|
||||
def test_C00201_AddShoppingBagAndSettlePayment(self):
|
||||
allure.dynamic.description("描述:加购无优惠商品")
|
||||
allure.step("步骤1:session开始")
|
||||
self.ymc.session_start()
|
||||
allure.step("步骤2:匿名登录")
|
||||
Payload01 = {"action": 0, "isAnon": True}
|
||||
LoginData = self.ymc.login_app_v2(Payload01)
|
||||
allure.step("步骤3:获取商品信息")
|
||||
GoodsInfoData = self.ymc.get_goods_info(InputCode=6924743915848)
|
||||
allure.step("步骤4:添加无优惠商品")
|
||||
self.ymc.add_retire_purchase(GoodsInfoData, 5, LoginData)
|
||||
allure.step("步骤5:获取购物车商品信息")
|
||||
self.ymc.get_cart_goods_info(GoodsInfoData)
|
||||
allure.step("步骤6:请求订单结算")
|
||||
self.ymc.request_order_settlement(LoginData)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main(verbosity=2)
|
@ -0,0 +1,5 @@
|
||||
# !/usr/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
# @Author:: Arthur Wu
|
||||
# @Description:: 游客登录,加购会员商品,并结算
|
||||
# @Date:: 2021-05-10 16:30:23
|
@ -84,8 +84,8 @@ class Engine():
|
||||
indexh5path = self.__execute()
|
||||
self.__set_overview_title(indexh5path, self.newName)
|
||||
returnList = []
|
||||
# lastReportPath = self.__move_file()
|
||||
# returnList.append(lastReportPath)
|
||||
lastReportPath = self.__move_file()
|
||||
returnList.append(lastReportPath)
|
||||
self.__delete_txt_files(txtPath)
|
||||
self.__delete_pycache_dirs(self.rootpath)
|
||||
return returnList
|
||||
|
Loading…
x
Reference in New Issue
Block a user