diff --git a/TestData/customer/customer_test_data.py b/TestData/customer/customer_test_data.py index 09d94b774e6f1f9f1349449523e0d7e733188c1b..56f9d9c78fbbe7c4f592013c80d346b9a5ea0a18 100644 --- a/TestData/customer/customer_test_data.py +++ b/TestData/customer/customer_test_data.py @@ -2,7 +2,8 @@ from Utils.global_variate import Global from Utils.mockData_handler import data_handler class customerData(Global): - customer_test_name = 'autotest_customer' - customer_test_email = 'autotest_customer@gmail.com' + random_id = data_handler.random_id() + 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_note = 'autotest_note_msg' diff --git a/TestFile/setting/shopifyIntegration/shopifyIntegration_shop_select.py b/TestFile/setting/shopifyIntegration/shopifyIntegration_shop_select.py index 2a5fcd360f390a2037ef76f657f27526cb265de9..f0def1259bfe0436d14ed7207492b3eb357787b6 100644 --- a/TestFile/setting/shopifyIntegration/shopifyIntegration_shop_select.py +++ b/TestFile/setting/shopifyIntegration/shopifyIntegration_shop_select.py @@ -37,8 +37,6 @@ if shopify_shop_select_result: new_js_select_result = test_env_conn.select_one_value(sql=new_js_select_sql) append_js_id = new_shop_select_result['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: 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) @@ -60,8 +58,7 @@ else: shop_id = append_shop_id setattr(shopifyIntegrationData, 'append_shop_id', append_shop_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_brand_id', shop_brand_id) setattr(shopifyIntegrationData, 'shop_company_id', shop_company_id) @@ -75,4 +72,3 @@ setattr(shopifyIntegrationData, 'shop_js', shop_js) setattr(shopifyIntegrationData, 'shop_integrated_email', shop_integrated_email) setattr(shopifyIntegrationData, 'shop_faq_willdesk_domain', shop_faq_willdesk_domain) setattr(shopifyIntegrationData, 'shop_faq_cname_domain', shop_faq_cname_domain) - diff --git a/YamlCase/setting/shopifyIntegration.yaml b/YamlCase/setting/shopifyIntegration.yaml index 13afec6674a6bf49b4ddb3651805e84d872696ce..584d49ee3a6bde7efef70f3c9d125fb9f8bcc63f 100644 --- a/YamlCase/setting/shopifyIntegration.yaml +++ b/YamlCase/setting/shopifyIntegration.yaml @@ -31,6 +31,7 @@ api4: title: 检查店铺信息 url: /api/v1/shop/local/shopInfoList method: post + before_sql: setting/shopifyIntegration/shopifyIntegration_shop_num_select.py data: {"omitShopSet":true,"omitEmbedding":true,"havePreShop":true,"v":"${v}"} expected: - eq: {"$.code" : 0}