コード例 #1
0
ファイル: test_proposal.py プロジェクト: rhyolight/nupic.son
 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
ファイル: test_proposal.py プロジェクト: rhyolight/nupic.son
  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
ファイル: test_proposal.py プロジェクト: rhyolight/nupic.son
  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
ファイル: test_proposal.py プロジェクト: rhyolight/nupic.son
  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
ファイル: test_proposal.py プロジェクト: rhyolight/nupic.son
    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
ファイル: test_proposal.py プロジェクト: rhyolight/nupic.son
    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
ファイル: test_proposal.py プロジェクト: rhyolight/nupic.son
    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
ファイル: test_proposal.py プロジェクト: rhyolight/nupic.son
 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)