Esempio n. 1
0
 def test_prepare_month_negative(self):
     self.assertEqual(
         "MONTH",
         regular_expressions.Report("TEST").prepare_month(-1),
         msg="Process PDF - Incorrect Error Handling when Input is -1")
     self.assertEqual(
         "MONTH",
         regular_expressions.Report("TEST").prepare_month(-10000),
         msg="Process PDF - Incorrect Error Handling when Input is -1")
Esempio n. 2
0
 def test_prepare_month_large(self):
     self.assertEqual(
         regular_expressions.Report("TEST").prepare_month(13),
         "MONTH",
         msg=
         "Process PDF - Incorrect Error Handling when Input is greater than 12"
     )
     self.assertEqual(
         regular_expressions.Report("TEST").prepare_month(float("inf")),
         "MONTH",
         msg="Prepare Month - max 64 bit floating point integer")
     self.assertEqual(
         regular_expressions.Report("TEST").prepare_month(10000),
         "MONTH",
         msg=
         "Process PDF - Incorrect Error Handling when Input is greater than 12"
     )
Esempio n. 3
0
 def test_prepare_month_string(self):
     self.assertEqual(
         "MONTH",
         regular_expressions.Report("TEST").prepare_month("test"),
         msg="Process PDF - Incorrect Error Handling when Input is string")
Esempio n. 4
0
 def test_prepare_month(self):
     self.assertEqual(
         "January",
         regular_expressions.Report("TEST").prepare_month(1),
         msg="Process PDF - Prepare Month Incorrect Return Value on Month 1"
     )
Esempio n. 5
0
 def test_prepare_name_middle_initial2(self):
     self.assertEqual(
         "Jones, Bob",
         regular_expressions.Report("TEST").prepare_name("Bob R Jones"),
         msg="Name Preparation Error: Middle Initial")
Esempio n. 6
0
 def test_prepare_name(self):
     self.assertEqual(
         "Jones, Bob",
         regular_expressions.Report("TEST").prepare_name("Bob Jones"),
         msg="Name Preparation Error: First Name and Surname")