Пример #1
0
 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)
Пример #2
0
  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)
Пример #3
0
  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)
Пример #4
0
  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)
Пример #5
0
    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)
Пример #6
0
    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)
Пример #7
0
    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)
Пример #8
0
 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)