Ignore:
Timestamp:
8 Jan 2015, 14:48:29 (10 years ago)
Author:
Henrik Bettermann
Message:

Add Uli's modifications r12425 - r12427 also in waeup.ikoba.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.ikoba/trunk/src/waeup/ikoba/products/tests/test_productoptions.py

    r12343 r12428  
    8686        return
    8787
     88    def test_eq(self):
     89        # we can compare equality of ProductOption objects
     90        item1 = ProductOption(self.valid_title, self.valid_fee, self.valid_currency)
     91        item2 = ProductOption(self.valid_title, self.valid_fee, self.valid_currency)
     92        item3 = ProductOption()
     93        item4 = ProductOption()
     94        assert item1 is not item2
     95        assert item1 == item1
     96        assert item1 == item2
     97        assert item3 is not item4
     98        assert item3 == item4
     99        assert item1.__eq__(item2) is True
     100        assert item1.__eq__(item3) is False
     101
     102    def test_ne(self):
     103        # we can also tell, which ResultEntries are _not_ equal
     104        item1 = ProductOption(self.valid_title, self.valid_fee, self.valid_currency)
     105        item2 = ProductOption()
     106        assert item1 != item2
     107        assert item1.__ne__(item2) is True
     108        assert item1.__ne__(item1) is False
     109
     110
     111
    88112class ProductOptionFieldTests(unittest.TestCase):
    89113
Note: See TracChangeset for help on using the changeset viewer.