Пример #1
0
 def test_hh_dict(self):
     result = phone({
         'country': '7',
         'city': '981',
         'number': '7041002'
     })
     self.assertEqual(result, expected)
Пример #2
0
 def test_broken_string(self):
     broken_string = '8AAA7041002'
     result = phone(broken_string)
     self.assertEqual(result, broken_string)
Пример #3
0
 def test_plus_bracket_hyphen_string(self):
     result = phone('8(981)704-10-02')
     self.assertEqual(result, expected)
Пример #4
0
 def test_plus_bracket_string(self):
     result = phone('+7(981)7041002')
     self.assertEqual(result, expected)
Пример #5
0
 def test_plus_hyphen_string(self):
     result = phone('+7981704-10-02')
     self.assertEqual(result, expected)
Пример #6
0
 def test_plus_string(self):
     result = phone('+79817041002')
     self.assertEqual(result, expected)
Пример #7
0
 def test_hh_formatted(self):
     result = phone({
         'formatted': '+79817041002'
     })
     self.assertEqual(result, expected)
Пример #8
0
 def test_no_country_code_phone(self):
     result = phone('9817041002')
     self.assertEqual(result, expected)