- Timestamp:
- 21 Nov 2014, 13:07:57 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.ikoba/branches/uli-payments/src/waeup/ikoba/payments/tests/test_paypal.py
r12027 r12029 20 20 import tempfile 21 21 import unittest 22 import paypalrestsdk 22 23 from zope.component import getGlobalSiteManager, queryUtility 23 24 from waeup.ikoba.interfaces import IPayPalConfig 24 25 from waeup.ikoba.payments.paypal import ( 25 26 get_paypal_config_file_path, parse_paypal_config, get_access_token, 27 configure_sdk, 26 28 ) 27 29 from waeup.ikoba.testing import ( … … 79 81 assert result['mode'] == "sandbox" 80 82 83 def test_configure_sdk(self): 84 # we can configure the paypal sdk 85 path = os.path.join(self.workdir, 'sample.cfg') 86 open(path, 'w').write( 87 "[rest-client]\n" 88 "id = my-special-id\n" 89 ) 90 result = configure_sdk(path) 91 assert result['client_id'] == 'my-special-id' 92 assert result['client_secret'] is None 93 assert result['mode'] == "sandbox" 94 assert paypalrestsdk.api.__api__.mode == 'sandbox' 95 assert paypalrestsdk.api.__api__.client_id == 'my-special-id' 96 81 97 82 98 class FunctionalPaypalTests(FunctionalTestCase):
Note: See TracChangeset for help on using the changeset viewer.