Esempio n. 1
0
 def test_match_line_re(self):
     result = match_line_re(valid_input_with_commas)
     self.assertEqual(14, len(result))
     (civil_registry_id, national_id, fbr_number, first_name, father_name,
      grandfather_name, mother_name, family_name, gender, birth_date,
      address, office_id, branch_id, state) = result
     self.assertEqual(
         ('2566665', '119690261935', '1009332066', ARABIC_NAME_WITH_COMMAS,
          'جمعة', 'عبدالصمد', 'صفية علي', 'عبدالرحمن', '1', '7/9/1969',
          'الاسكندرية', '35', '54', '0'),
         (civil_registry_id, national_id, fbr_number, first_name,
          father_name, grandfather_name, mother_name, family_name, gender,
          birth_date, address, office_id, branch_id, state))
Esempio n. 2
0
 def test_match_line_re(self):
     result = match_line_re(valid_input_with_commas)
     self.assertEqual(14, len(result))
     (civil_registry_id, national_id, fbr_number,
      first_name, father_name,
      grandfather_name, mother_name,
      family_name, gender, birth_date,
      address, office_id, branch_id, state) = result
     self.assertEqual(
         ('2566665', '119690261935', '1009332066',
          ARABIC_NAME_WITH_COMMAS, 'جمعة',
          'عبدالصمد', 'صفية علي',
          'عبدالرحمن', '1', '7/9/1969',
          'الاسكندرية', '35', '54', '0'),
         (civil_registry_id, national_id, fbr_number,
          first_name, father_name,
          grandfather_name, mother_name,
          family_name, gender, birth_date,
          address, office_id, branch_id, state)
     )
Esempio n. 3
0
 def test_match_line_re_invalid_line(self):
     invalid_input = valid_input[0]
     invalid_input = invalid_input.replace(');\r\n', ',0,2);\r\n')
     with self.assertRaises(ValueError):
         match_line_re(invalid_input)
Esempio n. 4
0
 def test_match_line_re_invalid_line(self):
     invalid_input = valid_input[0]
     invalid_input = invalid_input.replace(');\r\n', ',0,2);\r\n')
     with self.assertRaises(ValueError):
         match_line_re(invalid_input)