Changeset 9030 for main/waeup.kofa/trunk


Ignore:
Timestamp:
20 Jul 2012, 09:49:39 (12 years ago)
Author:
Henrik Bettermann
Message:

Test if forbidden pg transitions are disabled in UI.

Location:
main/waeup.kofa/trunk/src/waeup/kofa/students
Files:
2 edited

Legend:

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

    r9029 r9030  
    446446        """Checks requirements the object must fulfill when being updated.
    447447
    448         This method is not used in case of deleting or adding objects.
    449 
    450448        Returns error messages as strings in case of requirement
    451449        problems.
  • main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_browser.py

    r9024 r9030  
    767767        self.browser.getControl(name="transition").value = ['return']
    768768        self.browser.getControl("Save").click()
     769        return
     770
     771    def test_manage_pg_workflow(self):
     772        # Managers can pass through the whole workflow
     773        IWorkflowState(self.student).setState('school fee paid')
     774        self.browser.addHeader('Authorization', 'Basic mgr:mgrpw')
     775        student = self.app['students'][self.student_id]
     776        self.browser.open(self.manage_student_path)
     777        self.assertTrue('<option value="reset6">' in self.browser.contents)
     778        self.assertTrue('<option value="register_courses">' in self.browser.contents)
     779        self.assertTrue('<option value="reset5">' in self.browser.contents)
     780        self.certificate.study_mode = 'pg_ft'
     781        self.browser.open(self.manage_student_path)
     782        self.assertFalse('<option value="reset6">' in self.browser.contents)
     783        self.assertFalse('<option value="register_courses">' in self.browser.contents)
     784        self.assertTrue('<option value="reset5">' in self.browser.contents)
    769785        return
    770786
Note: See TracChangeset for help on using the changeset viewer.