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'])
Exemple #2
0
 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'])
Exemple #3
0
 def test_alpha2(self):
     country = mobile_codes.alpha2(u'AQ')
     self.assertEqual(country.mcc, None)
Exemple #4
0
 def test_alpha2(self):
     country = mobile_codes.alpha2(u'CA')
     self.assertEqual(country.alpha2, u'CA')
Exemple #5
0
 def configure(self, **kw):
     kw.setdefault('mcc', mobile_codes.alpha2('MX').mcc)
     kw.setdefault('mnc', '020')  # AMX
     return super(TestBoku, self).configure(**kw)
Exemple #6
0
 def configure(self, **kw):
     kw.setdefault('mcc', mobile_codes.alpha2('MX').mcc)
     kw.setdefault('mnc', '020')  # AMX
     return super(TestBoku, self).configure(**kw)
Exemple #7
0
 def test_alpha2_fail(self):
     with pytest.raises(KeyError):
         mobile_codes.alpha2("XX")
Exemple #8
0
 def test_alpha2(self):
     country = mobile_codes.alpha2("CA")
     assert country.alpha2 == "CA"
Exemple #9
0
 def test_alpha2(self):
     country = mobile_codes.alpha2("AQ")
     assert country.mcc is None
 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')