def test_equal_with_country_code_source_set(self):
     numberA = PhoneNumber()
     numberA.raw_input = "+1 650 253 00 00"
     numberA.country_code_source = CountryCodeSource.FROM_NUMBER_WITH_PLUS_SIGN
     numberB = PhoneNumber()
     numberB.raw_input = "+1 650 253 00 00"
     numberB.country_code_source = CountryCodeSource.FROM_NUMBER_WITH_PLUS_SIGN
     self.assertEquals(numberA, numberB)
Ejemplo n.º 2
0
 def test_equal_with_country_code_source_set(self):
     numberA = PhoneNumber()
     numberA.raw_input = "+1 650 253 00 00"
     numberA.country_code_source = CountryCodeSource.FROM_NUMBER_WITH_PLUS_SIGN
     numberB = PhoneNumber()
     numberB.raw_input = "+1 650 253 00 00"
     numberB.country_code_source = CountryCodeSource.FROM_NUMBER_WITH_PLUS_SIGN
     self.assertEquals(numberA, numberB)
Ejemplo n.º 3
0
 def test_non_equal_with_differing_raw_input(self):
     numberA = PhoneNumber()
     numberA.country_code = 1
     numberA.national_number = 6502530000L
     numberA.raw_input = "+1 650 253 00 00"
     numberA.country_code_source = CountryCodeSource.FROM_NUMBER_WITH_PLUS_SIGN
     numberB = PhoneNumber()
     # Although these numbers would pass an isNumberMatch test, they are
     # not considered "equal" as objects, since their raw input is
     # different.
     numberB.country_code = 1
     numberB.national_number = 6502530000L
     numberB.raw_input = "+1-650-253-00-00"
     numberB.country_code_source = CountryCodeSource.FROM_NUMBER_WITH_PLUS_SIGN
     self.assertNotEqual(numberA, numberB)
Ejemplo n.º 4
0
 def test_non_equal_with_differing_raw_input(self):
     numberA = PhoneNumber()
     numberA.country_code = 1
     numberA.national_number = 6502530000L
     numberA.raw_input = "+1 650 253 00 00"
     numberA.country_code_source = CountryCodeSource.FROM_NUMBER_WITH_PLUS_SIGN
     numberB = PhoneNumber()
     # Although these numbers would pass an isNumberMatch test, they are
     # not considered "equal" as objects, since their raw input is
     # different.
     numberB.country_code = 1
     numberB.national_number = 6502530000L
     numberB.raw_input = "+1-650-253-00-00"
     numberB.country_code_source = CountryCodeSource.FROM_NUMBER_WITH_PLUS_SIGN
     self.assertNotEqual(numberA, numberB)