Commit a35c1b18 authored by zhanhuasheng's avatar zhanhuasheng

bugfix

parent b29ad28f
...@@ -2,7 +2,8 @@ from Utils.global_variate import Global ...@@ -2,7 +2,8 @@ from Utils.global_variate import Global
from Utils.mockData_handler import data_handler from Utils.mockData_handler import data_handler
class customerData(Global): class customerData(Global):
customer_test_name = 'autotest_customer' random_id = data_handler.random_id()
customer_test_email = 'autotest_customer@gmail.com' customer_test_name = 'autotest_customer%s'%random_id
customer_test_email = 'autotest_customer@gmail.com%s'%random_id
customer_test_phone = data_handler.phone() customer_test_phone = data_handler.phone()
customer_test_note = 'autotest_note_msg' customer_test_note = 'autotest_note_msg'
...@@ -37,8 +37,6 @@ if shopify_shop_select_result: ...@@ -37,8 +37,6 @@ if shopify_shop_select_result:
new_js_select_result = test_env_conn.select_one_value(sql=new_js_select_sql) new_js_select_result = test_env_conn.select_one_value(sql=new_js_select_sql)
append_js_id = new_shop_select_result['id'] append_js_id = new_shop_select_result['id']
setattr(shopifyIntegrationData, 'append_js_id', append_js_id) setattr(shopifyIntegrationData, 'append_js_id', append_js_id)
shop_num_result = test_env_conn.select_many_value(sql=shopify_shop_select_sql)
setattr(shopifyIntegrationData, 'shop_num', len(shop_num_result))
else: else:
test_env_conn.execute_sql(sql=shopify_shop_insert_sql) test_env_conn.execute_sql(sql=shopify_shop_insert_sql)
new_shop_select_result = test_env_conn.select_one_value(sql=new_shop_select_sql) new_shop_select_result = test_env_conn.select_one_value(sql=new_shop_select_sql)
...@@ -60,8 +58,7 @@ else: ...@@ -60,8 +58,7 @@ else:
shop_id = append_shop_id shop_id = append_shop_id
setattr(shopifyIntegrationData, 'append_shop_id', append_shop_id) setattr(shopifyIntegrationData, 'append_shop_id', append_shop_id)
setattr(shopifyIntegrationData, 'append_js_id', append_js_id) setattr(shopifyIntegrationData, 'append_js_id', append_js_id)
shop_num_result = test_env_conn.select_many_value(sql=shopify_shop_select_sql)
setattr(shopifyIntegrationData, 'shop_num', len(shop_num_result))
setattr(shopifyIntegrationData, 'shop_id', shop_id) setattr(shopifyIntegrationData, 'shop_id', shop_id)
setattr(shopifyIntegrationData, 'shop_brand_id', shop_brand_id) setattr(shopifyIntegrationData, 'shop_brand_id', shop_brand_id)
setattr(shopifyIntegrationData, 'shop_company_id', shop_company_id) setattr(shopifyIntegrationData, 'shop_company_id', shop_company_id)
...@@ -75,4 +72,3 @@ setattr(shopifyIntegrationData, 'shop_js', shop_js) ...@@ -75,4 +72,3 @@ setattr(shopifyIntegrationData, 'shop_js', shop_js)
setattr(shopifyIntegrationData, 'shop_integrated_email', shop_integrated_email) setattr(shopifyIntegrationData, 'shop_integrated_email', shop_integrated_email)
setattr(shopifyIntegrationData, 'shop_faq_willdesk_domain', shop_faq_willdesk_domain) setattr(shopifyIntegrationData, 'shop_faq_willdesk_domain', shop_faq_willdesk_domain)
setattr(shopifyIntegrationData, 'shop_faq_cname_domain', shop_faq_cname_domain) setattr(shopifyIntegrationData, 'shop_faq_cname_domain', shop_faq_cname_domain)
...@@ -31,6 +31,7 @@ api4: ...@@ -31,6 +31,7 @@ api4:
title: 检查店铺信息 title: 检查店铺信息
url: /api/v1/shop/local/shopInfoList url: /api/v1/shop/local/shopInfoList
method: post method: post
before_sql: setting/shopifyIntegration/shopifyIntegration_shop_num_select.py
data: {"omitShopSet":true,"omitEmbedding":true,"havePreShop":true,"v":"${v}"} data: {"omitShopSet":true,"omitEmbedding":true,"havePreShop":true,"v":"${v}"}
expected: expected:
- eq: {"$.code" : 0} - eq: {"$.code" : 0}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment