Skip to content

Commit

Permalink
Tests for CountryCodeSource.to_string
Browse files Browse the repository at this point in the history
  • Loading branch information
daviddrysdale committed Apr 18, 2023
1 parent c9ecd77 commit 8dd9d82
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions python/tests/phonenumberutiltest.py
Original file line number Diff line number Diff line change
Expand Up @@ -3325,6 +3325,12 @@ def testEnumString(self):
self.assertEqual(ValidationResult.to_string(ValidationResult.TOO_LONG), u("TOO_LONG"))
self.assertEqual(ValidationResult.to_string(999), u("INVALID (999)"))

self.assertEqual(CountryCodeSource.to_string(CountryCodeSource.UNSPECIFIED), u("UNSPECIFIED"))
self.assertEqual(CountryCodeSource.to_string(CountryCodeSource.FROM_NUMBER_WITH_PLUS_SIGN), u("FROM_NUMBER_WITH_PLUS_SIGN"))
self.assertEqual(CountryCodeSource.to_string(CountryCodeSource.FROM_NUMBER_WITH_IDD), u("FROM_NUMBER_WITH_IDD"))
self.assertEqual(CountryCodeSource.to_string(CountryCodeSource.FROM_DEFAULT_COUNTRY), u("FROM_DEFAULT_COUNTRY"))
self.assertEqual(CountryCodeSource.to_string(999), u("INVALID (999)"))

def testCoverage(self):
# Python version extra tests
self.assertIsNone(phonenumberutil._region_code_for_number_from_list(GB_NUMBER, ("XX",)))
Expand Down

0 comments on commit 8dd9d82

Please sign in to comment.