Beispiel #1
0
 def test_female_name():
     """
     :return: true if test passed, false if not
     """
     print("Female names are from correct list. Loop:", ITLG)
     for _i in range(ITLG):
         full_name = Person.get_full_name(100, 100, 0)
         name1 = full_name.get("first_name")
         name2 = full_name.get("middle_name")
         assert name1 in names_female and name2 in names_female
Beispiel #2
0
 def test_surname():
     """
     :return: true if test passed, false if not
     """
     print("Surnames are from correct list. Loop:", ITLG)
     for _i in range(ITLG):
         full_name = Person.get_full_name(50, 50, 100)
         surname1 = full_name.get("surname1")
         surname2 = full_name.get("surname2")
         assert surname1 in surnames and surname2 in surnames
Beispiel #3
0
 def test_double_surname():
     """
     :return: true if test passed, false if not
     """
     print("Inequality in surnames. Loop:", ITLG)
     for _i in range(ITLG):
         full_name = Person.get_full_name(50, 0, 100)
         surname1 = full_name.get("surname1")
         surname2 = full_name.get("surname2")
         assert surname1 != surname2
Beispiel #4
0
 def test_double_name():
     """
     :return: true if test passed, false if not
     """
     print("Inequality of first and middle names. Loop:", ITLG)
     for _i in range(ITLG):
         full_name = Person.get_full_name(100, 100, 0)
         name1 = full_name.get("first_name")
         name2 = full_name.get("middle_name")
         assert name1 != name2
Beispiel #5
0
 def test_surname_non_empty():
     """
     :return: true if test passed, false if not
     """
     print("Last names are not empty. Loop:", ITLG)
     for _i in range(ITLG):
         full_name = Person.get_full_name(50, 50, 100)
         surname1 = len(full_name.get("surname1"))
         surname2 = len(full_name.get("surname2"))
         assert surname1 > 0 and surname2 > 0
Beispiel #6
0
 def test_name_non_empty():
     """
     :return: true if test passed, false if not
     """
     print("First and middle names are not empty. Loop:", ITLG)
     for _i in range(ITLG):
         full_name = Person.get_full_name(50, 100, 50)
         name1 = len(full_name.get("first_name"))
         name2 = len(full_name.get("middle_name"))
         assert name1 > 0 and name2 > 0
Beispiel #7
0
 def test_name_neq_surname():
     """
     :return: true if test passed, false if not
     """
     print("Surname is different than names. Loop:", ITLG)
     for _i in range(ITLG):
         full_name = Person.get_full_name(50, 40, 40)
         name1 = full_name.get("first_name")
         name2 = full_name.get("middle_name")
         surname1 = full_name.get("surname1")
         surname2 = full_name.get("surname2")
         if surname2 == "" and name2 == "":
             assert name1 != surname1, full_name
             assert name2 != surname1, full_name
         else:
             assert name1 != surname1 and name1 != surname2, full_name
             assert name2 != surname1 and name2 != surname2, full_name