Arthur-Wu committed this file on 2024-11-18
This commit is contained in:
parent
0829b7a15a
commit
1e74762193
@ -12,7 +12,6 @@ def _assert_result(RspJson, ExpRespJson_c, LOGGER):
|
||||
FailedCase = []
|
||||
if ExpRespJson_c["data"] not in ['', None, True, False, "true", "false"]:
|
||||
if type(RspJson["data"]) == dict:
|
||||
# 0302-校验返回体中的修改的参数值是否正确
|
||||
for key, expect_value in ExpRespJson_c['data'].items():
|
||||
return_value = RspJson['data'][key]
|
||||
if expect_value == return_value:
|
||||
|
@ -52,10 +52,7 @@ class PGSQL():
|
||||
|
||||
def del_sample_activity_data(self, IDList=None):
|
||||
import time
|
||||
print('---开始删除派样活动自动化测试脏数据')
|
||||
for SampActivityID in IDList:
|
||||
# for SampActivityID in range(120, 140):
|
||||
print(f'---待删除ID为:{SampActivityID}')
|
||||
selsqlstr = f'SELECT * FROM public.sample_activity WHERE id={SampActivityID};'
|
||||
delsqlstr = [
|
||||
f"DELETE FROM public.sample_activity_gift WHERE activity_id={SampActivityID};",
|
||||
@ -69,15 +66,11 @@ class PGSQL():
|
||||
time.sleep(0.5)
|
||||
self.select_data(selsqlstr)
|
||||
self.close()
|
||||
print("---删除 派样活动 脏数据结束!\n")
|
||||
|
||||
def del_coupon_activity_data(self, IDList=None):
|
||||
try:
|
||||
import time
|
||||
print('---开始删除 优惠券活动 自动化测试脏数据')
|
||||
for ActivityID in IDList:
|
||||
# for ActivityID in range(251, 264):
|
||||
print(f'---待删除ID为:{ActivityID}')
|
||||
selsqlstr = f'SELECT * FROM public.coupon_setting WHERE id={ActivityID};'
|
||||
delsqlstr = [
|
||||
f"DELETE FROM public.coupon_setting_distribution WHERE coupon_setting_id={ActivityID};",
|
||||
@ -89,9 +82,7 @@ class PGSQL():
|
||||
time.sleep(0.5)
|
||||
self.select_data(selsqlstr)
|
||||
self.close()
|
||||
print("---删除派样活动脏数据结束!\n")
|
||||
return "---[Successed]"
|
||||
except Exception as e:
|
||||
print(f"---删除派样活动脏数据失败: {e}\n")
|
||||
return e
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user