def testForStudentWithNoProposals(self): # it is possible to submit proposal during the student app period # and the student has not proposals can_submit = proposal_logic.canSubmitProposal(self.student, self.program, self.timeline) self.assertTrue(can_submit)
def testAfterStudentAppPeriod(self): # move the student app period to the future self.timeline.student_signup_end = timeline_utils.past() self.timeline.put() # it is not possible to submit a proposal now can_submit = proposal_logic.canSubmitProposal( self.student, self.program, self.timeline) self.assertFalse(can_submit)
def testForStudentWithMaxProposals(self): # change the student so that max proposals are already submitted self.student.student_data.number_of_proposals = ( self.program.apps_tasks_limit) self.student.put() # it is not possible to submit a next proposal can_submit = proposal_logic.canSubmitProposal( self.student, self.program, self.timeline) self.assertFalse(can_submit)
def testForStudentWithMaxMinusOneProposals(self): # change the student so that already max - 1 proposals are submitted self.student.student_data.number_of_proposals = ( self.program.apps_tasks_limit - 1) self.student.put() # it is still possible for the student to submit a proposal can_submit = proposal_logic.canSubmitProposal( self.student, self.program, self.timeline) self.assertTrue(can_submit)
def testAfterStudentAppPeriod(self): # move the student app period to the future self.timeline.student_signup_end = timeline_utils.past() self.timeline.put() # it is not possible to submit a proposal now can_submit = proposal_logic.canSubmitProposal(self.student, self.program, self.timeline) self.assertFalse(can_submit)
def testForStudentWithMaxProposals(self): # change the student so that max proposals are already submitted self.student.student_data.number_of_proposals = ( self.program.apps_tasks_limit) self.student.put() # it is not possible to submit a next proposal can_submit = proposal_logic.canSubmitProposal(self.student, self.program, self.timeline) self.assertFalse(can_submit)
def testForStudentWithMaxMinusOneProposals(self): # change the student so that already max - 1 proposals are submitted self.student.student_data.number_of_proposals = ( self.program.apps_tasks_limit - 1) self.student.put() # it is still possible for the student to submit a proposal can_submit = proposal_logic.canSubmitProposal(self.student, self.program, self.timeline) self.assertTrue(can_submit)
def testForStudentWithNoProposals(self): # it is possible to submit proposal during the student app period # and the student has not proposals can_submit = proposal_logic.canSubmitProposal( self.student, self.program, self.timeline) self.assertTrue(can_submit)