Changeset 8664 for main/waeup.kofa/trunk/src/waeup
- Timestamp:
- 9 Jun 2012, 15:43:07 (12 years ago)
- Location:
- main/waeup.kofa/trunk/src/waeup/kofa/applicants
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/applicants/browser.py
r8636 r8664 964 964 self.flash(_('The form cannot be submitted. Wrong state!')) 965 965 return 966 if not self.context.__parent__.enddate or ( 967 self.context.__parent__.enddate < datetime.now(pytz.utc)): 966 cond1 = self.context.__parent__.strict_deadline 967 cond2 = self.context.__parent__.enddate 968 cond3 = self.context.__parent__.enddate < datetime.now(pytz.utc) 969 if cond1 and (not cond2 or cond3): 968 970 self.flash( 969 971 _('The form cannot be submitted. Application period has expired!')) -
main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/test_browser.py
r8643 r8664 90 90 applicantscontainer.application_category = 'basic' 91 91 applicantscontainer.mode = 'create' 92 applicantscontainer.strict_deadline = True 92 93 delta = timedelta(days=10) 93 94 applicantscontainer.startdate = datetime.now(pytz.utc) - delta … … 792 793 self.assertTrue( 793 794 'Application period has expired' in self.browser.contents) 795 # We can either postpone the enddate ... 794 796 self.applicantscontainer.enddate = datetime.now( 795 797 pytz.utc) + timedelta(days=10) 798 self.browser.getControl(name="confirm_passport").value = True 799 self.browser.getControl("Final Submit").click() 800 self.assertTrue( 801 '... submitted ...' in self.browser.contents) 802 # ... or allow submission after deadline. 803 IWorkflowState(self.applicant).setState('paid') 804 self.applicant.locked = False 805 self.applicantscontainer.strict_deadline = False 806 self.browser.open(self.edit_path) 796 807 self.browser.getControl(name="confirm_passport").value = True 797 808 self.browser.getControl("Final Submit").click() -
main/waeup.kofa/trunk/src/waeup/kofa/applicants/utils.py
r8645 r8664 62 62 return None 63 63 64 def getApplicantsStatistics(self, container):64 def getApplicantsStatistics(self, container): 65 65 state_stats = {INITIALIZED:0, STARTED:0, PAID:0, SUBMITTED:0, 66 66 ADMITTED:0, NOT_ADMITTED:0, CREATED:0}
Note: See TracChangeset for help on using the changeset viewer.