- Timestamp:
- 28 Dec 2014, 07:53:48 (10 years ago)
- Location:
- main/waeup.ikoba/trunk/src/waeup/ikoba/products
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.ikoba/trunk/src/waeup/ikoba/products/productoptions.py
r12328 r12331 73 73 try: 74 74 fee = Decimal(fee) 75 title = unicode(title) 76 currency = unicode(currency) 75 77 except TypeError: 76 78 pass -
main/waeup.ikoba/trunk/src/waeup/ikoba/products/tests/test_productoptions.py
r12327 r12331 65 65 myinput = u"(u'%s',u'%s',u'%s')" % ( 66 66 self.valid_title, self.valid_fee, self.valid_currency) 67 myinput2 = u"('%s','%s','%s')" % ( 68 self.valid_title, self.valid_fee, self.valid_currency) 67 69 item1 = ProductOption.from_string(myinput) 68 70 item2 = ProductOption.from_string(u"(u'', u'', u'')") 69 71 item3 = ProductOption.from_string(u"(None, None, None)") 72 item4 = ProductOption.from_string(myinput2) 70 73 self.assertEqual(item1.title, self.valid_title) 71 74 self.assertEqual(item1.fee, self.valid_fee) … … 77 80 self.assertTrue(item3.fee is None) 78 81 self.assertEqual(item3.currency, None) 82 self.assertEqual(item4.title, self.valid_title) 83 self.assertEqual(item4.fee, self.valid_fee) 84 self.assertEqual(item4.currency, self.valid_currency) 79 85 return 80 86
Note: See TracChangeset for help on using the changeset viewer.