From 37d3ea38970a9ac35438cbeee7b67a1ecbcaf40e Mon Sep 17 00:00:00 2001 From: zhanhuasheng Date: Mon, 15 Apr 2024 10:04:28 +0800 Subject: [PATCH] bugfix --- TestData/customer/customer_test_data.py | 3 ++- Utils/mockData_handler.py | 11 +++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 Utils/mockData_handler.py diff --git a/TestData/customer/customer_test_data.py b/TestData/customer/customer_test_data.py index bc6bed3..09d94b7 100644 --- a/TestData/customer/customer_test_data.py +++ b/TestData/customer/customer_test_data.py @@ -1,7 +1,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' - customer_test_phone = '13611122222' + customer_test_phone = data_handler.phone() customer_test_note = 'autotest_note_msg' diff --git a/Utils/mockData_handler.py b/Utils/mockData_handler.py new file mode 100644 index 0000000..688f3dd --- /dev/null +++ b/Utils/mockData_handler.py @@ -0,0 +1,11 @@ +import random + +class MockData: + + def phone(self): + number = '13' + str(random.randint(100000000, 999999999)) + return number + + + +data_handler = MockData() \ No newline at end of file -- GitLab