예제 #1
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'])
예제 #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'])
예제 #3
0
 def test_alpha2(self):
     country = mobile_codes.alpha2(u'AQ')
     self.assertEqual(country.mcc, None)
예제 #4
0
 def test_alpha2(self):
     country = mobile_codes.alpha2(u'CA')
     self.assertEqual(country.alpha2, u'CA')
예제 #5
0
파일: tests.py 프로젝트: MorrisJobke/webpay
 def configure(self, **kw):
     kw.setdefault('mcc', mobile_codes.alpha2('MX').mcc)
     kw.setdefault('mnc', '020')  # AMX
     return super(TestBoku, self).configure(**kw)
예제 #6
0
파일: tests.py 프로젝트: lissyx/webpay
 def configure(self, **kw):
     kw.setdefault('mcc', mobile_codes.alpha2('MX').mcc)
     kw.setdefault('mnc', '020')  # AMX
     return super(TestBoku, self).configure(**kw)
예제 #7
0
파일: tests.py 프로젝트: jwhitlock/ichnaea
 def test_alpha2_fail(self):
     with pytest.raises(KeyError):
         mobile_codes.alpha2("XX")
예제 #8
0
파일: tests.py 프로젝트: jwhitlock/ichnaea
 def test_alpha2(self):
     country = mobile_codes.alpha2("CA")
     assert country.alpha2 == "CA"
예제 #9
0
파일: tests.py 프로젝트: jwhitlock/ichnaea
 def test_alpha2(self):
     country = mobile_codes.alpha2("AQ")
     assert country.mcc is None
예제 #10
0
 def test_alpha2(self):
     country = mobile_codes.alpha2(u'AQ')
     self.assertEqual(country.mcc, None)
예제 #11
0
 def test_alpha2(self):
     country = mobile_codes.alpha2(u'CA')
     self.assertEqual(country.alpha2, u'CA')