示例#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
 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
 def test_alpha2_fail(self):
     with pytest.raises(KeyError):
         mobile_codes.alpha2("XX")
示例#8
0
 def test_alpha2(self):
     country = mobile_codes.alpha2("CA")
     assert country.alpha2 == "CA"
示例#9
0
 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')