Changeset 12342 for main/waeup.ikoba/trunk/src
- Timestamp:
- 30 Dec 2014, 10:19:47 (10 years ago)
- Location:
- main/waeup.ikoba/trunk/src/waeup/ikoba
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.ikoba/trunk/src/waeup/ikoba/customers/tests/sample_contract_data.csv
r12336 r12342 1 1 class_name,contract_id,reg_number,product_object,document_object,product_options 2 SampleContract,c3,1,SAM,DOC1,"[('Base Fee', '800.6', ' usd')]"2 SampleContract,c3,1,SAM,DOC1,"[('Base Fee', '800.6', 'USD')]" 3 3 SampleContract,c4,2,SAM,DOC1,[] 4 4 SampleContract,c5,3,SAM,DOC1,[] -
main/waeup.ikoba/trunk/src/waeup/ikoba/customers/tests/test_batching.py
r12336 r12342 104 104 option.title = u'Base Fee' 105 105 option.fee = Decimal('800.6') 106 option.currency = ' usd'106 option.currency = 'USD' 107 107 self.product.options = [option,] 108 108 self.app['products'].addProduct(self.product) … … 501 501 self.assertEqual(contract.product_options[0].title, 'Base Fee') 502 502 self.assertEqual(contract.product_options[0].fee, Decimal('800.6') ) 503 self.assertEqual(contract.product_options[0].currency, ' usd')503 self.assertEqual(contract.product_options[0].currency, 'USD') 504 504 self.assertEqual(contract.contract_id, 'c3') 505 505 contract = self.processor.getEntry(dict(reg_number='3', -
main/waeup.ikoba/trunk/src/waeup/ikoba/customers/tests/test_browser.py
r12341 r12342 109 109 prodoption.title = u'First option' 110 110 prodoption.fee = Decimal('99.9') 111 prodoption.currency = ' usd'111 prodoption.currency = 'USD' 112 112 self.product.options = [prodoption,] 113 113 self.app['products'].addProduct(self.product) … … 1287 1287 prodoption.title = u'Any product option' 1288 1288 prodoption.fee = Decimal('88.8') 1289 prodoption.currency = ' eur'1289 prodoption.currency = 'EUR' 1290 1290 contract.product_options = [prodoption,] 1291 1291 self.browser.open(self.contracts_path + '/%s/edit' % conid) … … 1293 1293 # from the chosen product. 1294 1294 self.assertTrue('<option selected="selected" value="Any product option">' 1295 'Any product option @ 88.8 eur</option>'1295 'Any product option @ 88.8 EUR</option>' 1296 1296 in self.browser.contents) 1297 1297 self.assertTrue('<option value="First option">First option ' 1298 '@ 99.9 usd</option>' in self.browser.contents)1298 '@ 99.9 USD</option>' in self.browser.contents) 1299 1299 # In test browser we can at least replace the option 1300 1300 self.browser.getControl( … … 1304 1304 self.assertEqual(contract.product_options[0].title, 'First option') 1305 1305 self.browser.getLink("View").click() 1306 self.assertTrue('<span>First option @ 99.9 usd</span>' in self.browser.contents)1306 self.assertTrue('<span>First option @ 99.9 USD</span>' in self.browser.contents) 1307 1307 self.assertEqual(self.browser.url, self.contracts_path + '/%s/index' % conid) 1308 1308 # An href attribute is referring to the document and product objects -
main/waeup.ikoba/trunk/src/waeup/ikoba/customers/tests/test_export.py
r12336 r12342 277 277 'SampleContract,sample,CON1,DOC1,[u\'2014-12-04 12:10:46 UTC - ' 278 278 'Contract created by system\'],,' 279 'SAM,"[(u\'Base Fee\', u\'800.6\', u\' usd\')]",'279 'SAM,"[(u\'Base Fee\', u\'800.6\', u\'USD\')]",' 280 280 'created,Our Sample Product,A111111\r\n', 281 281 result … … 297 297 'SampleContract,sample,CON1,DOC1,[u\'2014-12-04 12:10:46 UTC - ' 298 298 'Contract created by system\'],,' 299 'SAM,"[(u\'Base Fee\', u\'800.6\', u\' usd\')]",'299 'SAM,"[(u\'Base Fee\', u\'800.6\', u\'USD\')]",' 300 300 'created,Our Sample Product,A111111\r\n', 301 301 result … … 317 317 'SampleContract,sample,CON1,DOC1,[u\'2014-12-04 12:10:46 UTC - ' 318 318 'Contract created by system\'],,' 319 'SAM,"[(u\'Base Fee\', u\'800.6\', u\' usd\')]",'319 'SAM,"[(u\'Base Fee\', u\'800.6\', u\'USD\')]",' 320 320 'created,Our Sample Product,A111111\r\n', 321 321 result -
main/waeup.ikoba/trunk/src/waeup/ikoba/interfaces.py
r12328 r12342 87 87 88 88 currencies = SimpleIkobaVocabulary( 89 (_('N aira'),'naira'),90 (_('USD'),' usd'),91 (_('EUR'),' eur'),89 (_('NGN'),'NGN'), 90 (_('USD'),'USD'), 91 (_('EUR'),'EUR'), 92 92 ) 93 93 -
main/waeup.ikoba/trunk/src/waeup/ikoba/products/tests/test_batching.py
r12327 r12342 86 86 options.title = u'Base Fee' 87 87 options.fee = Decimal('800.6') 88 options.currency = ' usd'88 options.currency = 'USD' 89 89 product.options = [options,] 90 90 self.app['products'][product.product_id] = self.product = product -
main/waeup.ikoba/trunk/src/waeup/ikoba/products/tests/test_browser.py
r12327 r12342 221 221 prodoptions.title = u'My option' 222 222 prodoptions.fee = Decimal('99.9') 223 prodoptions.currency = ' usd'223 prodoptions.currency = 'USD' 224 224 self.product.options = [prodoptions,] 225 225 self.browser.addHeader('Authorization', 'Basic mgr:mgrpw') -
main/waeup.ikoba/trunk/src/waeup/ikoba/products/tests/test_export.py
r12336 r12342 64 64 'contract_category,contract_title,options,' 65 65 'product_id,title,users_with_local_roles\r\n' 66 'license,,"[(u\'Base Fee\', u\'800.6\', u\' usd\')]",LIC,Unnamed,'66 'license,,"[(u\'Base Fee\', u\'800.6\', u\'USD\')]",LIC,Unnamed,' 67 67 '"[{\'user_name\': u\'john\', \'local_role\': ' 68 68 'u\'johnsrole\'}]"\r\n' … … 79 79 'contract_category,contract_title,options,' 80 80 'product_id,title,users_with_local_roles\r\n' 81 'license,,"[(u\'Base Fee\', u\'800.6\', u\' usd\')]",LIC,Unnamed,'81 'license,,"[(u\'Base Fee\', u\'800.6\', u\'USD\')]",LIC,Unnamed,' 82 82 '"[{\'user_name\': u\'john\', \'local_role\': ' 83 83 'u\'johnsrole\'}]"\r\n' -
main/waeup.ikoba/trunk/src/waeup/ikoba/products/tests/test_productoptions.py
r12331 r12342 17 17 self.valid_title = u'Option 1' 18 18 self.valid_fee = Decimal(55.5) 19 self.valid_currency = ' usd'19 self.valid_currency = 'USD' 20 20 return 21 21 -
main/waeup.ikoba/trunk/src/waeup/ikoba/utils/tests/test_converters.py
r12327 r12342 389 389 converter = IObjectConverter(IContact) 390 390 # get currently valid values 391 req_string = u"[(u'T1', u'55.6', u' usd'), (u'T2', u'66.6', u'eur')]"391 req_string = u"[(u'T1', u'55.6', u'USD'), (u'T2', u'66.6', u'EUR')]" 392 392 err, inv_err, data = converter.fromStringDict( 393 393 {"options": req_string,}, 'contact') … … 397 397 self.assertEqual(result_options[0].title, 'T1') 398 398 self.assertEqual(result_options[0].fee, Decimal('55.6')) 399 self.assertEqual(result_options[0].currency, ' usd')399 self.assertEqual(result_options[0].currency, 'USD') 400 400 self.assertEqual(result_options[1].title, 'T2') 401 401 self.assertEqual(result_options[1].fee, Decimal('66.6')) 402 self.assertEqual(result_options[1].currency, ' eur')402 self.assertEqual(result_options[1].currency, 'EUR') 403 403 return 404 404
Note: See TracChangeset for help on using the changeset viewer.