作者 dengyuting

fix

@@ -21,6 +21,9 @@ def sleep(n_secs): @@ -21,6 +21,9 @@ def sleep(n_secs):
21 def convert_to_string(value): 21 def convert_to_string(value):
22 return str(value) 22 return str(value)
23 23
  24 +def convert_to_int(value):
  25 + return int(value)
  26 +
24 27
25 def get_nowtime(): 28 def get_nowtime():
26 return time.strftime("%Y%m%d%H%M%S",time.localtime(time.time())) 29 return time.strftime("%Y%m%d%H%M%S",time.localtime(time.time()))
@@ -14,8 +14,9 @@ def cal_orderPrice(univalence, *args): @@ -14,8 +14,9 @@ def cal_orderPrice(univalence, *args):
14 def cal_Ratio(ratio, univalence, *args): 14 def cal_Ratio(ratio, univalence, *args):
15 price = cal_orderPrice(univalence, *args) 15 price = cal_orderPrice(univalence, *args)
16 sum = ratio/100 * price 16 sum = ratio/100 * price
17 - return sum  
18 - 17 + # print(str(int(sum)))
  18 + return str(int(sum))
  19 +# cal_Ratio(10,15,300)
19 20
20 def add(x, y): 21 def add(x, y):
21 """ 22 """
@@ -31,7 +31,7 @@ teststeps: @@ -31,7 +31,7 @@ teststeps:
31 #####合伙人已收分红总额 31 #####合伙人已收分红总额
32 - eq: 32 - eq:
33 - content.data.order.receivedDividends 33 - content.data.order.receivedDividends
34 - - 0 34 + - ${convert_to_string(0)}
35 #####合伙人未收分红总额 35 #####合伙人未收分红总额
36 - eq: 36 - eq:
37 - content.data.order.notReceivedDividend 37 - content.data.order.notReceivedDividend
@@ -47,7 +47,7 @@ teststeps: @@ -47,7 +47,7 @@ teststeps:
47 #####产品1总金额 47 #####产品1总金额
48 - eq: 48 - eq:
49 - content.data.product.detail.0.commodityPrice 49 - content.data.product.detail.0.commodityPrice
50 - - ${convert_to_string(1500)} 50 + - 1500
51 #####产品1应收分红 51 #####产品1应收分红
52 - eq: 52 - eq:
53 - content.data.product.detail.0.partnerDividends 53 - content.data.product.detail.0.partnerDividends
@@ -59,7 +59,7 @@ teststeps: @@ -59,7 +59,7 @@ teststeps:
59 #####产品2总金额 59 #####产品2总金额
60 - eq: 60 - eq:
61 - content.data.product.detail.1.commodityPrice 61 - content.data.product.detail.1.commodityPrice
62 - - ${convert_to_string(3000)} 62 + - 3000
63 #####产品2应收分红 63 #####产品2应收分红
64 - eq: 64 - eq:
65 - content.data.product.detail.1.partnerDividends 65 - content.data.product.detail.1.partnerDividends
@@ -54,23 +54,23 @@ teststeps: @@ -54,23 +54,23 @@ teststeps:
54 validate: 54 validate:
55 - eq: 55 - eq:
56 - content.data.order.orderId 56 - content.data.order.orderId
57 - - ${convert_to_string($actual_id)} 57 + - $actual_id
58 #####合伙人未收分红总额 58 #####合伙人未收分红总额
59 - eq: 59 - eq:
60 - content.data.order.notReceivedDividend 60 - content.data.order.notReceivedDividend
61 - - 0 61 + - ${convert_to_string(375)}
62 #####合伙人已收分红总额 62 #####合伙人已收分红总额
63 - eq: 63 - eq:
64 - content.data.order.receivedDividends 64 - content.data.order.receivedDividends
65 - - 0 65 + - ${convert_to_string(0)}
66 #####合伙人应收分红总额 66 #####合伙人应收分红总额
67 - eq: 67 - eq:
68 - content.data.order.partnerDividends 68 - content.data.order.partnerDividends
69 - - 375 69 + - ${convert_to_string(375)}
70 #####合伙人分红支出总额 70 #####合伙人分红支出总额
71 - eq: 71 - eq:
72 - content.data.order.dividendSpending 72 - content.data.order.dividendSpending
73 - - 0 73 + - ${convert_to_string(0)}
74 #####初始总数量 74 #####初始总数量
75 - eq: 75 - eq:
76 - content.data.product.orderNumCount 76 - content.data.product.orderNumCount
@@ -82,38 +82,38 @@ teststeps: @@ -82,38 +82,38 @@ teststeps:
82 #####合伙人应收分红总额调整 82 #####合伙人应收分红总额调整
83 - eq: 83 - eq:
84 - content.data.product.partnerDividendsCount 84 - content.data.product.partnerDividendsCount
85 - - 375 85 + - ${convert_to_string(375)}
86 #####产品1是否正确 86 #####产品1是否正确
87 - eq: 87 - eq:
88 - - content.data.product.0.id  
89 - - $product_id_1 88 + - content.data.product.detail.0.productId
  89 + - ${convert_to_int($product_id_1)}
90 #####产品1总金额 90 #####产品1总金额
91 - eq: 91 - eq:
92 - - content.data.product.0.detail.commodityPrice 92 + - content.data.product.detail.0.commodityPrice
93 - 750 93 - 750
94 #####产品1应收分红 94 #####产品1应收分红
95 - eq: 95 - eq:
96 - - content.data.product.0.detail.partnerDividends  
97 - - 75 96 + - content.data.product.detail.0.partnerDividends
  97 + - ${convert_to_string(75)}
98 #####产品1数量调整 98 #####产品1数量调整
99 - eq: 99 - eq:
100 - - content.data.product.0.orderNum 100 + - content.data.product.detail.0.orderNum
101 - $goodNumber 101 - $goodNumber
102 #####产品1分红状态 102 #####产品1分红状态
103 - eq: 103 - eq:
104 - - content.data.product.0.stateOfPayment 104 + - content.data.product.detail.0.paymentStatus
105 - 1 105 - 1
106 #####产品2总金额 106 #####产品2总金额
107 - eq: 107 - eq:
108 - - content.data.product.1.detail.commodityPrice 108 + - content.data.product.detail.1.commodityPrice
109 - 3000 109 - 3000
110 #####产品2应收分红 110 #####产品2应收分红
111 - eq: 111 - eq:
112 - - content.data.product.1.detail.partnerDividends  
113 - - 300 112 + - content.data.product.detail.1.partnerDividends
  113 + - ${convert_to_string(300)}
114 #####产品2分红状态 114 #####产品2分红状态
115 - eq: 115 - eq:
116 - - content.data.product.1.stateOfPayment 116 + - content.data.product.detail.1.paymentStatus
117 - 1 117 - 1
118 118
119 - name: 查看实际订单列表 119 - name: 查看实际订单列表
@@ -49,54 +49,54 @@ teststeps: @@ -49,54 +49,54 @@ teststeps:
49 validate: 49 validate:
50 - eq: 50 - eq:
51 - content.data.order.orderId 51 - content.data.order.orderId
52 - - ${convert_to_string($actual_id)} 52 + - $actual_id
53 #####合伙人应收分红总额 53 #####合伙人应收分红总额
54 - eq: 54 - eq:
55 - content.data.order.partnerDividends 55 - content.data.order.partnerDividends
56 - - 450 56 + - ${convert_to_string(450)}
57 #####合伙人未收分红总额 57 #####合伙人未收分红总额
58 - eq: 58 - eq:
59 - content.data.order.notReceivedDividend 59 - content.data.order.notReceivedDividend
60 - - 300 60 + - ${convert_to_string(300)}
61 #####合伙人已收分红总额 61 #####合伙人已收分红总额
62 - eq: 62 - eq:
63 - content.data.order.receivedDividends 63 - content.data.order.receivedDividends
64 - - 150 64 + - ${convert_to_string(150)}
65 #####合伙人分红支出总额 65 #####合伙人分红支出总额
66 - eq: 66 - eq:
67 - content.data.order.dividendSpending 67 - content.data.order.dividendSpending
68 - - 0 68 + - ${convert_to_string(0)}
69 #####产品1是否正确 69 #####产品1是否正确
70 - eq: 70 - eq:
71 - - content.data.product.0.id  
72 - - $product_id_1 71 + - content.data.product.detail.0.productId
  72 + - ${convert_to_int($product_id_1)}
73 #####产品1总金额 73 #####产品1总金额
74 - eq: 74 - eq:
75 - - content.data.product.0.detail.commodityPrice 75 + - content.data.product.detail.0.commodityPrice
76 - 1500 76 - 1500
77 #####产品1应收分红 77 #####产品1应收分红
78 - eq: 78 - eq:
79 - - content.data.product.0.detail.partnerDividends  
80 - - 150 79 + - content.data.product.detail.0.partnerDividends
  80 + - ${convert_to_string(150)}
81 #####产品1数量 81 #####产品1数量
82 - eq: 82 - eq:
83 - - content.data.product.0.orderNum 83 + - content.data.product.detail.0.orderNum
84 - 100 84 - 100
85 #####产品1分红状态 85 #####产品1分红状态
86 - eq: 86 - eq:
87 - - content.data.product.0.stateOfPayment 87 + - content.data.product.detail.0.paymentStatus
88 - 2 88 - 2
89 #####产品2总金额 89 #####产品2总金额
90 - eq: 90 - eq:
91 - - content.data.product.1.detail.commodityPrice 91 + - content.data.product.detail.1.commodityPrice
92 - 3000 92 - 3000
93 #####产品2应收分红 93 #####产品2应收分红
94 - eq: 94 - eq:
95 - - content.data.product.1.detail.partnerDividends  
96 - - 300 95 + - content.data.product.detail.1.partnerDividends
  96 + - ${convert_to_string(300)}
97 #####产品2分红状态 97 #####产品2分红状态
98 - eq: 98 - eq:
99 - - content.data.product.1.stateOfPayment 99 + - content.data.product.detail.1.paymentStatus
100 - 1 100 - 1
101 101
102 - name: 查看实际订单列表 102 - name: 查看实际订单列表
@@ -67,55 +67,55 @@ teststeps: @@ -67,55 +67,55 @@ teststeps:
67 api: api/m_api/dividends/m_dividends_detail_api.yml 67 api: api/m_api/dividends/m_dividends_detail_api.yml
68 validate: 68 validate:
69 - eq: 69 - eq:
70 - - content.data.order.id  
71 - - ${convert_to_string($actual_id)} 70 + - content.data.order.orderId
  71 + - $actual_id
72 #####合伙人应收分红总额 72 #####合伙人应收分红总额
73 - eq: 73 - eq:
74 - content.data.order.partnerDividends 74 - content.data.order.partnerDividends
75 - - 450 75 + - ${convert_to_string(375)}
76 #####合伙人未收分红总额 76 #####合伙人未收分红总额
77 - eq: 77 - eq:
78 - content.data.order.notReceivedDividend 78 - content.data.order.notReceivedDividend
79 - - 300 79 + - ${convert_to_string(300)}
80 #####合伙人已收分红总额 80 #####合伙人已收分红总额
81 - eq: 81 - eq:
82 - content.data.order.receivedDividends 82 - content.data.order.receivedDividends
83 - - 150 83 + - ${convert_to_string(150)}
84 #####合伙人分红支出总额 84 #####合伙人分红支出总额
85 - eq: 85 - eq:
86 - content.data.order.dividendSpending 86 - content.data.order.dividendSpending
87 - - 75 87 + - ${convert_to_string(75)}
88 #####产品1是否正确 88 #####产品1是否正确
89 - eq: 89 - eq:
90 - - content.data.product.0.id  
91 - - $product_id_1 90 + - content.data.product.detail.0.productId
  91 + - ${convert_to_int($product_id_1)}
92 #####产品1总金额 92 #####产品1总金额
93 - eq: 93 - eq:
94 - - content.data.product.0.detail.commodityPrice  
95 - - 1500 94 + - content.data.product.detail.0.commodityPrice
  95 + - 750
96 #####产品1应收分红 96 #####产品1应收分红
97 - eq: 97 - eq:
98 - - content.data.product.0.detail.partnerDividends  
99 - - 150 98 + - content.data.product.detail.0.partnerDividends
  99 + - ${convert_to_string(75)}
100 #####产品1数量 100 #####产品1数量
101 - eq: 101 - eq:
102 - - content.data.product.0.orderNum  
103 - - 100 102 + - content.data.product.detail.0.orderNum
  103 + - 50
104 #####产品1分红状态 104 #####产品1分红状态
105 - eq: 105 - eq:
106 - - content.data.product.0.stateOfPayment 106 + - content.data.product.detail.0.paymentStatus
107 - 2 107 - 2
108 #####产品2总金额 108 #####产品2总金额
109 - eq: 109 - eq:
110 - - content.data.product.1.detail.commodityPrice 110 + - content.data.product.detail.1.commodityPrice
111 - 3000 111 - 3000
112 #####产品2应收分红 112 #####产品2应收分红
113 - eq: 113 - eq:
114 - - content.data.product.1.detail.partnerDividends  
115 - - 300 114 + - content.data.product.detail.1.partnerDividends
  115 + - ${convert_to_string(300)}
116 #####产品2分红状态 116 #####产品2分红状态
117 - eq: 117 - eq:
118 - - content.data.product.1.stateOfPayment 118 + - content.data.product.detail.1.paymentStatus
119 - 1 119 - 1
120 120
121 - name: 查看实际订单列表 121 - name: 查看实际订单列表