コード例 #1
0
 def test_normal_phone_number(self):
     test_number = '(56-32) 1234567'
     self.assertEqual('+56321234567', process_phone_number(test_number))
コード例 #2
0
 def test_short_phone_number(self):
     test_number = '1234'
     self.assertIsNone(process_phone_number(test_number))
コード例 #3
0
 def test_dashed_spaced_number(self):
     test_number = '32-250 46 04'
     self.assertEqual('+56322504604', process_phone_number(test_number))
コード例 #4
0
 def test_dashed_parenthesis_number(self):
     test_number = '(56) 32 2504156'
     self.assertEqual('+56322504156', process_phone_number(test_number))
コード例 #5
0
 def test_spaced_number(self):
     test_number = '32 2504040'
     self.assertEqual('+56322504040', process_phone_number(test_number))
コード例 #6
0
 def test_dual_number(self):
     test_number = '322504225-322504658'
     self.assertEqual('+56322504225', process_phone_number(test_number))
コード例 #7
0
 def test_already_formatted_number(self):
     test_number = '+56321234567'
     self.assertEqual(test_number, process_phone_number(test_number))
コード例 #8
0
 def test_no_string_number(self):
     test_number = 1234
     self.assertIsNone(process_phone_number(test_number))
コード例 #9
0
 def test_short_phone_number_with_code(self):
     test_number = '(56-32) 123456'
     self.assertIsNone(process_phone_number(test_number))