Ignore:
Timestamp:
15 Mar 2015, 13:26:44 (10 years ago)
Author:
Henrik Bettermann
Message:

We need to produce unique tokens in ProductOptionSourceFactory?.

Location:
main/waeup.ikoba/trunk/src/waeup/ikoba/customers
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.ikoba/trunk/src/waeup/ikoba/customers/tests/test_browser.py

    r12768 r12770  
    14841484        # from the chosen product.
    14851485        self.assertTrue(
    1486             '<option selected="selected" value="Any product option">'
     1486            '<option selected="selected" value="Any product option_88.8_EUR">'
    14871487            'Any product option @ 88.8 Euro</option>'
    14881488            in self.browser.contents)
    1489         self.assertTrue('<option value="First option">First option '
     1489        self.assertTrue('<option value="First option_99.9_USD">First option '
    14901490                        '@ 99.9 US Dollar</option>' in self.browser.contents)
    14911491        # In test browser we can at least replace the option
    14921492        self.browser.getControl(
    1493             name="form.product_options.0.").value = ['First option']
     1493            name="form.product_options.0.").value = ['First option_99.9_USD']
    14941494        self.assertEqual(
    14951495            contract.product_options[0].title, 'Any product option')
  • main/waeup.ikoba/trunk/src/waeup/ikoba/customers/vocabularies.py

    r12592 r12770  
    233233
    234234    def getToken(self, context, value):
    235         return value.title
     235        return "%s_%s_%s" % (value.title, value.fee, value.currency)
    236236
    237237    def getTitle(self, context, value):
Note: See TracChangeset for help on using the changeset viewer.