Changeset 11984


Ignore:
Timestamp:
18 Nov 2014, 09:55:33 (10 years ago)
Author:
Henrik Bettermann
Message:

Activate mandate tests.

File:
1 edited

Legend:

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

    r11954 r11984  
    8585        shutil.rmtree(self.dc_root)
    8686
    87     def xx_test_set_student_password(self):
    88         student = createObject('waeup.Student')
     87    def test_set_customer_password(self):
     88        customer = createObject('waeup.Customer')
    8989        # Add and execute a mandate with missing parameters.
    9090        mandate = PasswordMandate()
     
    9999        # Add and execute a perfect mandate
    100100        mandate = PasswordMandate()
    101         mandate.params['user'] = student
     101        mandate.params['user'] = customer
    102102        mandate.params['password'] = 'mypwd1'
    103103        self.app['mandates'].addMandate(mandate)
     
    105105        # Password has been set.
    106106        self.assertEqual(msg, 'Password has been successfully set. Login with your new password.')
    107         self.assertTrue(IUserAccount(student).checkPassword('mypwd1'))
     107        self.assertTrue(IUserAccount(customer).checkPassword('mypwd1'))
    108108        # All mandates have been removed.
    109109        self.assertEqual(len(self.app['mandates'].keys()), 0)
     
    143143        self.assertEqual([i for i in self.app['mandates'].keys()], [u'23456'])
    144144
    145     def xx_test_browser(self):
    146         student = createObject('waeup.Student')
    147         self.app['students'].addStudent(student)
     145    def test_browser(self):
     146        customer = createObject('waeup.Customer')
     147        self.app['customers'].addCustomer(customer)
    148148        mandate = PasswordMandate()
    149         mandate.params['user'] = student
     149        mandate.params['user'] = customer
    150150        mandate.params['password'] = 'mypwd1'
    151151        self.app['mandates'].addMandate(mandate)
     
    155155        self.assertTrue('Password has been successfully set. Login with your new password.'
    156156            in self.browser.contents)
    157         self.assertTrue(IUserAccount(student).checkPassword('mypwd1'))
     157        self.assertTrue(IUserAccount(customer).checkPassword('mypwd1'))
    158158        # All mandates have been removed.
    159159        self.assertEqual(len(self.app['mandates'].keys()), 0)
Note: See TracChangeset for help on using the changeset viewer.