Changeset 9514 for main


Ignore:
Timestamp:
2 Nov 2012, 18:58:00 (12 years ago)
Author:
Henrik Bettermann
Message:

Check if payments_catalog is updated after payment.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_browser.py

    r9507 r9514  
    787787                           self.browser.contents)
    788788
     789        # The ticket can be found in the payments_catalog
     790        cat = queryUtility(ICatalog, name='payments_catalog')
     791        results = list(cat.searchResults(p_state=('unpaid', 'unpaid')))
     792        self.assertTrue(len(results), 1)
     793        self.assertTrue(results[0] is self.student['payments'][value])
     794
    789795        # Managers can approve the payment
    790796        self.assertEqual(len(self.app['accesscodes']['SFE-0']),0)
     
    805811        self.assertEqual(
    806812            self.app['accesscodes']['SFE-0'].values()[0].cost,40000.0)
     813
     814        # The catalog has been updated
     815        results = list(cat.searchResults(p_state=('unpaid', 'unpaid')))
     816        self.assertTrue(len(results), 0)
     817        results = list(cat.searchResults(p_state=('paid', 'paid')))
     818        self.assertTrue(len(results), 1)
     819        self.assertTrue(results[0] is self.student['payments'][value])
    807820
    808821        # Payments can't be approved twice
Note: See TracChangeset for help on using the changeset viewer.