def testIsPossibleShortNumber(self):
        possibleNumber = PhoneNumber(country_code=33, national_number=123456)
        self.assertTrue(is_possible_short_number(possibleNumber))
        self.assertTrue(is_possible_short_number_for_region(_parse("123456", "FR"), "FR"))

        impossibleNumber = PhoneNumber(country_code=33, national_number=9)
        self.assertFalse(is_possible_short_number(impossibleNumber))

        # Note that GB and GG share the country calling code 44, and that this
        # number is possible but not valid.
        self.assertTrue(is_possible_short_number(PhoneNumber(country_code=44, national_number=11001)))

        # Python version extra test: check invalid region code
        self.assertFalse(is_possible_short_number_for_region(_parse("123456", "US"), "XY"))
    def testIsPossibleShortNumber(self):
        possibleNumber = PhoneNumber(country_code=33, national_number=123456)
        self.assertTrue(is_possible_short_number(possibleNumber))
        self.assertTrue(is_possible_short_number_for_region(_parse("123456", "FR"), "FR"))

        impossibleNumber = PhoneNumber(country_code=33, national_number=9)
        self.assertFalse(is_possible_short_number(impossibleNumber))

        # Note that GB and GG share the country calling code 44, and that this
        # number is possible but not valid.
        self.assertTrue(is_possible_short_number(PhoneNumber(country_code=44, national_number=11001)))

        # Python version extra test: check invalid region code
        self.assertFalse(is_possible_short_number_for_region("123456", "XY"))
    def testIsPossibleShortNumber(self):
        possibleNumber = PhoneNumber(country_code=33, national_number=123456)
        self.assertTrue(is_possible_short_number_object(possibleNumber))
        self.assertTrue(is_possible_short_number("123456", "FR"))

        impossibleNumber = PhoneNumber(country_code=33, national_number=9)
        self.assertFalse(is_possible_short_number_object(impossibleNumber))
        self.assertFalse(is_possible_short_number("9", "FR"))

        # Python version extra test: check invalid region code
        self.assertFalse(is_possible_short_number("123456", "XY"))
        # Python version extra test: multiple regions with same calling code
        self.assertTrue(is_possible_short_number_object(
                PhoneNumber(country_code=44, national_number=18001)))
        # Python version extra test: multiple regions with same calling code, hit none
        self.assertFalse(is_possible_short_number_object(
                PhoneNumber(country_code=44, national_number=58001)))