示例#1
0
 def test_town_non_empty():
     """
     :return: true if test passed, false if not
     """
     print("Town is not empty. Loop:", ITLG)
     for _i in range(ITLG):
         value = len(Person.get_town())
         assert value > 0
示例#2
0
 def test_postcode_format():
     """
     :return: true if test passed, false if not
     """
     print("Postcode complies with the format. Loop:", ITLG)
     for _i in range(ITLG):
         town = Person.get_town()
         value = Person.get_postcode(town["p"])
         left = value[:1].isnumeric()
         mid = value[-3:-2].isnumeric()
         right = value[-1:].isnumeric()
         assert left is False and mid is True and right is False