Ignore:
Timestamp:
30 Dec 2014, 10:19:47 (10 years ago)
Author:
Henrik Bettermann
Message:

Fix currency keys.

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  
    11class_name,contract_id,reg_number,product_object,document_object,product_options
    2 SampleContract,c3,1,SAM,DOC1,"[('Base Fee', '800.6', 'usd')]"
     2SampleContract,c3,1,SAM,DOC1,"[('Base Fee', '800.6', 'USD')]"
    33SampleContract,c4,2,SAM,DOC1,[]
    44SampleContract,c5,3,SAM,DOC1,[]
  • main/waeup.ikoba/trunk/src/waeup/ikoba/customers/tests/test_batching.py

    r12336 r12342  
    104104        option.title = u'Base Fee'
    105105        option.fee = Decimal('800.6')
    106         option.currency = 'usd'
     106        option.currency = 'USD'
    107107        self.product.options = [option,]
    108108        self.app['products'].addProduct(self.product)
     
    501501        self.assertEqual(contract.product_options[0].title, 'Base Fee')
    502502        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')
    504504        self.assertEqual(contract.contract_id, 'c3')
    505505        contract = self.processor.getEntry(dict(reg_number='3',
  • main/waeup.ikoba/trunk/src/waeup/ikoba/customers/tests/test_browser.py

    r12341 r12342  
    109109        prodoption.title = u'First option'
    110110        prodoption.fee = Decimal('99.9')
    111         prodoption.currency = 'usd'
     111        prodoption.currency = 'USD'
    112112        self.product.options = [prodoption,]
    113113        self.app['products'].addProduct(self.product)
     
    12871287        prodoption.title = u'Any product option'
    12881288        prodoption.fee = Decimal('88.8')
    1289         prodoption.currency = 'eur'
     1289        prodoption.currency = 'EUR'
    12901290        contract.product_options = [prodoption,]
    12911291        self.browser.open(self.contracts_path + '/%s/edit' % conid)
     
    12931293        # from the chosen product.
    12941294        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>'
    12961296                        in self.browser.contents)
    12971297        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)
    12991299        # In test browser we can at least replace the option
    13001300        self.browser.getControl(
     
    13041304        self.assertEqual(contract.product_options[0].title, 'First option')
    13051305        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)
    13071307        self.assertEqual(self.browser.url, self.contracts_path + '/%s/index' % conid)
    13081308        # 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  
    277277            'SampleContract,sample,CON1,DOC1,[u\'2014-12-04 12:10:46 UTC - '
    278278            'Contract created by system\'],,'
    279             'SAM,"[(u\'Base Fee\', u\'800.6\', u\'usd\')]",'
     279            'SAM,"[(u\'Base Fee\', u\'800.6\', u\'USD\')]",'
    280280            'created,Our Sample Product,A111111\r\n',
    281281            result
     
    297297            'SampleContract,sample,CON1,DOC1,[u\'2014-12-04 12:10:46 UTC - '
    298298            'Contract created by system\'],,'
    299             'SAM,"[(u\'Base Fee\', u\'800.6\', u\'usd\')]",'
     299            'SAM,"[(u\'Base Fee\', u\'800.6\', u\'USD\')]",'
    300300            'created,Our Sample Product,A111111\r\n',
    301301            result
     
    317317            'SampleContract,sample,CON1,DOC1,[u\'2014-12-04 12:10:46 UTC - '
    318318            'Contract created by system\'],,'
    319             'SAM,"[(u\'Base Fee\', u\'800.6\', u\'usd\')]",'
     319            'SAM,"[(u\'Base Fee\', u\'800.6\', u\'USD\')]",'
    320320            'created,Our Sample Product,A111111\r\n',
    321321            result
  • main/waeup.ikoba/trunk/src/waeup/ikoba/interfaces.py

    r12328 r12342  
    8787
    8888currencies = SimpleIkobaVocabulary(
    89     (_('Naira'),'naira'),
    90     (_('USD'),'usd'),
    91     (_('EUR'),'eur'),
     89    (_('NGN'),'NGN'),
     90    (_('USD'),'USD'),
     91    (_('EUR'),'EUR'),
    9292    )
    9393
  • main/waeup.ikoba/trunk/src/waeup/ikoba/products/tests/test_batching.py

    r12327 r12342  
    8686        options.title = u'Base Fee'
    8787        options.fee = Decimal('800.6')
    88         options.currency = 'usd'
     88        options.currency = 'USD'
    8989        product.options = [options,]
    9090        self.app['products'][product.product_id] = self.product = product
  • main/waeup.ikoba/trunk/src/waeup/ikoba/products/tests/test_browser.py

    r12327 r12342  
    221221        prodoptions.title = u'My option'
    222222        prodoptions.fee = Decimal('99.9')
    223         prodoptions.currency = 'usd'
     223        prodoptions.currency = 'USD'
    224224        self.product.options = [prodoptions,]
    225225        self.browser.addHeader('Authorization', 'Basic mgr:mgrpw')
  • main/waeup.ikoba/trunk/src/waeup/ikoba/products/tests/test_export.py

    r12336 r12342  
    6464            'contract_category,contract_title,options,'
    6565            '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,'
    6767            '"[{\'user_name\': u\'john\', \'local_role\': '
    6868            'u\'johnsrole\'}]"\r\n'
     
    7979            'contract_category,contract_title,options,'
    8080            '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,'
    8282            '"[{\'user_name\': u\'john\', \'local_role\': '
    8383            'u\'johnsrole\'}]"\r\n'
  • main/waeup.ikoba/trunk/src/waeup/ikoba/products/tests/test_productoptions.py

    r12331 r12342  
    1717        self.valid_title = u'Option 1'
    1818        self.valid_fee = Decimal(55.5)
    19         self.valid_currency = 'usd'
     19        self.valid_currency = 'USD'
    2020        return
    2121
  • main/waeup.ikoba/trunk/src/waeup/ikoba/utils/tests/test_converters.py

    r12327 r12342  
    389389        converter = IObjectConverter(IContact)
    390390        # 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')]"
    392392        err, inv_err, data = converter.fromStringDict(
    393393            {"options": req_string,}, 'contact')
     
    397397        self.assertEqual(result_options[0].title, 'T1')
    398398        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')
    400400        self.assertEqual(result_options[1].title, 'T2')
    401401        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')
    403403        return
    404404
Note: See TracChangeset for help on using the changeset viewer.