Changeset 12454 for main/waeup.ikoba/trunk/src/waeup/ikoba/payments/tests
- Timestamp:
- 12 Jan 2015, 15:19:54 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.ikoba/trunk/src/waeup/ikoba/payments/tests/test_paypal.py
r12453 r12454 1156 1156 assert service.get_credit_card(u'CARD2') is None 1157 1157 1158 def test_store_credit_card_no_credcard_container(self): 1159 # a missing creditcards container is created on-the-fly 1158 @external_paypal_test 1159 def test_store_credit_card(self): 1160 # we can (and must) store credit card data online. 1160 1161 site = self.create_site() 1161 1162 assert 'creditcards' not in site 1162 1163 service = PayPalCreditCardService() 1163 1164 credit_card = self.get_credit_card() 1164 service.store_credit_card(credit_card) 1165 result = service.store_credit_card(credit_card) 1166 # a missing creditcards container is created on-the-fly 1165 1167 assert 'creditcards' in site 1168 assert ICreditCardToken.providedBy(result) 1169 assert result.payer_id in site['creditcards'] 1170 assert site['creditcards'][result.payer_id] == result 1171 1172 @external_paypal_test 1173 def test_store_credit_card_invalid(self): 1174 # an exception is raised with invalid credit cards. 1175 site = self.create_site() 1176 service = PayPalCreditCardService() 1177 credit_card = CreditCard( 1178 number=u"12345678", 1179 credit_card_type="visa", 1180 expire_month=4, 1181 expire_year=2012, 1182 ) 1183 self.assertRaises( 1184 IOError, service.store_credit_card, credit_card) 1166 1185 1167 1186 def test_create_payment_no_credictard(self):
Note: See TracChangeset for help on using the changeset viewer.