示例#1
0
 def test_email_6():
     """
     :return: true if test passed, false if not
     """
     print("Email address has correct format - type 6", ITLG)
     for _i in range(ITLG):
         person = Person.get_core_details()
         email = Person.get_email(person, '6')
         user = email.index('@')
         cmp = (person["surname1"] + person["first_name"]).lower()
         assert email[:user] == cmp
示例#2
0
 def get_people(rows, pkey, queue, **kwargs):
     """
     generate birthdays that are distributed normally (Gaussian dist.)
     :param rows: number of records
     :param pkey: primary key
     :param queue: queue object
     :param kwargs: params from GUI, example below:
     {'pgender': 50, 'pdname': 25,
     'dob1': '1945', 'dob2': '1997', 'pdsurname': 15}
     :return: no return parameters
     """
     serie = []
     dob1 = "1/1/" + kwargs["dob1"]
     dob2 = "31/12/" + kwargs["dob2"]
     ratio = 0.1
     dob = Gaussian.randnormal_date(rows, dob1, dob2, ratio)
     for i in range(rows):
         current = Person.get_core_details(**kwargs)
         current["dob"] = dob[i]
         current["pk"] = pkey + i
         ordered = OrderedDict((n, current[n]) for n in HEADERS)
         serie.append(ordered)
     queue.put(serie)
     return