def test_puerto_rico(self): # Allow mainland US 310 as a valid code for Puerto Rico. # At least AT&T has cell networks with a mcc of 310 installed # in Puerto Rico, see # https://github.com/andymckay/mobile-codes/issues/10 country = mobile_codes.alpha2(u'PR') self.assertEqual(country.mcc, [u'310', '330'])
def test_alpha2(self): country = mobile_codes.alpha2(u'AQ') self.assertEqual(country.mcc, None)
def test_alpha2(self): country = mobile_codes.alpha2(u'CA') self.assertEqual(country.alpha2, u'CA')
def configure(self, **kw): kw.setdefault('mcc', mobile_codes.alpha2('MX').mcc) kw.setdefault('mnc', '020') # AMX return super(TestBoku, self).configure(**kw)
def test_alpha2_fail(self): with pytest.raises(KeyError): mobile_codes.alpha2("XX")
def test_alpha2(self): country = mobile_codes.alpha2("CA") assert country.alpha2 == "CA"
def test_alpha2(self): country = mobile_codes.alpha2("AQ") assert country.mcc is None