def test_load_alt_patterns(load_fixture): phone_number = PhoneNumber(load_fixture) assert phone_number.get_national() == '+0{}'.format('2' * 7) assert phone_number.get_mobile() == '+0{}'.format('1' * 9) clean_alt_patters() phone_number = PhoneNumber(load_fixture) num_obj = phonenumbers.parse(phone_number.get_national(), load_fixture) assert phonenumbers.is_valid_number_for_region(num_obj, load_fixture) num_obj = phonenumbers.parse(phone_number.get_mobile(), load_fixture) assert phonenumbers.is_valid_number_for_region(num_obj, load_fixture)
def test_mobile(country, count): phone_number = PhoneNumber(country) number = phone_number.get_mobile() num_obj = phonenumbers.parse(number, country) assert phonenumbers.is_valid_number_for_region(num_obj, country)