Exemple #1
0
 def test_cvv_invalid2(self):
 	self.assertEqual(ccr.get_brand('4532127071054225',"54632"),"Unknown card brand")
Exemple #2
0
 def test_brand_valid_amex(self):
     self.assertEqual(ccr.get_brand('379614703832171',"6542"),"This is a American Express card")
Exemple #3
0
 def test_cvv_invalid(self):
 	self.assertEqual(ccr.get_brand('30205863084058',"1a3"),"Invalid cvv!")
Exemple #4
0
 def test_brand_valid_diners_club_carte_blanche(self):
     self.assertEqual(ccr.get_brand('30205863084058',"324"),"This is a Diners Club Carte Blanche card")
Exemple #5
0
 def test_brand_valid_diners_club_carte_blanche2(self):
     self.assertEqual(ccr.get_brand('36340633332133',"324"),"This is a Diners Club Carte Blanche card")    
Exemple #6
0
 def test_brand_valid_discover(self):
     self.assertEqual(ccr.get_brand('6011244304345315',"324"),"This is a Discover card")
Exemple #7
0
 def test_brand_valid_mastercard(self):
     self.assertEqual(ccr.get_brand('5553760583414254',"324"),"This is a Mastercard")
Exemple #8
0
 def test_brand_valid_visa(self):
     self.assertEqual(ccr.get_brand('4532127071054225',"324"),"This is a Visa card")
Exemple #9
0
 def test_brand_invalid(self):
     self.assertEqual(ccr.get_brand('4222222222222222',"324"),"Invalid card number")
Exemple #10
0
def get_brand(cardNumber, cvv):
    return str(ccv.get_brand(str(cardNumber), str(cvv)))