def test_failed_extraction(self):
     record = DataRecord(
         "1234566717531509960800629696666000000000008939XXXXXXX Z1212P86"
         "                                       04036                  "
         "               "
     )
     self.assertEqual(upload.extract_prisoner_details(record), None)
Пример #2
0
 def _test_successful_extraction(self, record, prisoner_number,
                                 prisoner_dob, from_description_field):
     parsed_number, parsed_dob, parsed_field = upload.extract_prisoner_details(
         record)
     self.assertEqual(parsed_number, prisoner_number)
     self.assertEqual(parsed_dob, prisoner_dob)
     self.assertEqual(parsed_field, from_description_field)
 def _test_successful_extraction(self, record, prisoner_number, prisoner_dob, from_description_field):
     parsed_number, parsed_dob, parsed_field = upload.extract_prisoner_details(record)
     self.assertEqual(parsed_number, prisoner_number)
     self.assertEqual(parsed_dob, prisoner_dob)
     self.assertEqual(parsed_field, from_description_field)
Пример #4
0
 def test_failed_extraction(self):
     record = DataRecord(
         '1234566717531509960800629696666000000000008939XXXXXXX Z1212P86'
         '                                       04036                  '
         '               ')
     self.assertEqual(upload.extract_prisoner_details(record), None)