2222cities_name_txt = os .path .join (ROOT_DIR , "random_profile/assets/cities_name.txt" )
2323states_names_txt = os .path .join (ROOT_DIR , "random_profile/assets/states_names.txt" )
2424job_titles_txt = os .path .join (ROOT_DIR , "random_profile/assets/job_titles.txt" )
25+ email_domain_txt = os .path .join (ROOT_DIR , "random_profile/assets/email_domains.txt" )
2526
2627# loading data from txt files
2728fname = load_txt_file (fname_txt )
3031cities_name = load_txt_file (cities_name_txt )
3132street_names = load_txt_file (street_names_txt )
3233job_titles = load_txt_file (job_titles_txt )
34+ email_domains = load_txt_file (email_domain_txt )
3335
3436class RandomProfile :
3537 def __init__ (self , num = 1 ):
@@ -57,14 +59,15 @@ def full_name(self):
5759 return full_name_list
5860
5961 def full_profile (self ):
60- # print full profile
6162 profile_list = []
6263 for _ in range (self .num ):
6364 first = random .choice (fname )
6465 last = random .choice (lname )
65- phone = f'+ +1-{ random .randint (300 , 500 )} { random .randint (800 , 999 )} { random .randint (1000 ,9999 )} '
66+ full_name = first + ' ' + last
67+ phone = f'+ +1-{ random .randint (300 , 500 )} -{ random .randint (800 , 999 )} -{ random .randint (1000 ,9999 )} '
6668 job_title = random .choice (job_titles )
6769 ip_address = ipv4_gen ()
70+ email_domain = random .choice (email_domains )
6871
6972 street_num = random .randint (100 , 999 )
7073 street = random .choice (street_names )
@@ -73,11 +76,12 @@ def full_profile(self):
7376 zip_code = random .randint (10000 , 99999 )
7477
7578 address = f'{ street_num } { street } St. { city } { state } { zip_code } '
76- email = first .lower () + last .lower () + '@bogusemail.com'
79+ email = first .lower () + last .lower () + '@' + email_domain
7780
7881 profile_dict = {}
7982 profile_dict ['first_name' ] = first
8083 profile_dict ['last_name' ] = last
84+ profile_dict ['full_name' ] = full_name
8185 profile_dict ['phone' ] = phone
8286 profile_dict ['address' ] = address
8387 profile_dict ['email' ] = email
0 commit comments