Changeset 12769 for main/waeup.ikoba/trunk
- Timestamp:
- 15 Mar 2015, 13:14:08 (10 years ago)
- Location:
- main/waeup.ikoba/trunk/src/waeup/ikoba/customers
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.ikoba/trunk/src/waeup/ikoba/customers/contracts.py
r12747 r12769 300 300 self.context = context 301 301 currencies = set([x.currency for x in context.product_options]) 302 # Cannot happen, but anyway ... 302 303 if len(currencies) > 1: 303 304 raise ValueError( -
main/waeup.ikoba/trunk/src/waeup/ikoba/customers/tests/test_contract.py
r12741 r12769 222 222 self.assertEqual(len(items), 0) 223 223 self.assertEqual(payable.currency, None) 224 225 def test_different_currencies_forbiddedn(self):226 # we do not accept different currencies in payment items227 contract = SampleContract()228 option1 = ProductOption(u"Fee 1", decimal.Decimal("31.10"), "EUR")229 option2 = ProductOption(u"Fee 2", decimal.Decimal("12.12"), "USD")230 contract.product_options = [option1, option2]231 self.assertRaises(ValueError, PayableContract, contract)
Note: See TracChangeset for help on using the changeset viewer.