Ignore:
Timestamp:
24 Feb 2013, 18:36:29 (12 years ago)
Author:
Henrik Bettermann
Message:

Add and adjust tests.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.fceokene/trunk/src/waeup/fceokene/interswitch/tests.py

    r9956 r9998  
    105105            in self.browser.contents)
    106106
    107         # Let's do the same for maintenance fee payment
     107        # Maintenance fee payment
    108108
    109109        self.browser.open(self.payments_path)
     
    122122        # Bed is randomly selected but, since there is only
    123123        # one bed for this student, we know that ...
    124         self.assertMatches('...Hall 1, Block A, Room 101, Bed A...',
    125                            self.browser.contents)
    126         self.assertMatches('...ticket created...',
    127                            self.browser.contents)
     124        self.assertFalse('Hall 1, Block A, Room 101, Bed A'
     125                           in self.browser.contents)
     126        self.assertTrue('(see payment slip)'
     127                           in self.browser.contents)
     128        self.assertTrue('ticket created'
     129                           in self.browser.contents)
    128130        self.browser.open(self.payments_path + '/addop')
    129131        self.browser.getControl(
     
    139141        self.assertTrue(
    140142            '<span>4150.0</span>' in self.browser.contents)
     143        # p_item is not unveiled
     144        self.assertFalse('Hall 1, Block A, Room 101, Bed A'
     145            in self.browser.contents)
     146        self.assertTrue('(visible after successful payment)'
     147            in self.browser.contents)
    141148        self.payment_url = self.browser.url
    142149        self.assertEqual(self.student['payments'][value].provider_amt, 0.0)
     
    161168        # BT does nor charge a fee for maintenance fee
    162169        self.assertFalse("BT Education" in self.browser.contents)
    163 
    164         # Let's do the same for acceptance fee
     170        # p_item is not unveiled
     171        self.assertFalse('Hall 1, Block A, Room 101, Bed A'
     172            in self.browser.contents)
     173        self.assertTrue('(visible after successful payment)'
     174            in self.browser.contents)
     175        # If the ticket is paid coordinates are shown
     176        self.student['payments'][value].p_state = 'paid'
     177        self.browser.open(self.payment_url)
     178        self.assertTrue('Hall 1, Block A, Room 101, Bed A'
     179            in self.browser.contents)
     180        self.assertFalse('(visible after successful payment)'
     181            in self.browser.contents)
     182
     183        # Acceptance fee payment
    165184
    166185        self.browser.open(self.payments_path)
Note: See TracChangeset for help on using the changeset viewer.