コード例 #1
0
    def testForClosedTask(self):
        """Tests for a mentor with a closed task assigned."""
        self.task.mentors = [self.profile.key()]
        self.task.status = 'Closed'
        self.task.put()

        result = profile_logic.canResignAsMentorForOrg(self.profile,
                                                       self.org.key())
        self.assertTrue(result)
コード例 #2
0
ファイル: test_profile.py プロジェクト: rhyolight/nupic.son
  def testForClosedTask(self):
    """Tests for a mentor with a closed task assigned."""
    self.task.mentors = [self.profile.key()]
    self.task.status = 'Closed'
    self.task.put()

    result = profile_logic.canResignAsMentorForOrg(
        self.profile, self.org.key())
    self.assertTrue(result)
コード例 #3
0
ファイル: test_profile.py プロジェクト: rhyolight/nupic.son
  def testForNonClosedTask(self):
    self.task.mentors = [self.profile.key()]
    statuses = [status for status in task_model.GCITask.status.choices
        if status != 'Closed']
    for status in statuses:
      self.task.status = status
      self.task.put()

      result = profile_logic.canResignAsMentorForOrg(
          self.profile, self.org.key())
      self.assertFalse(result)
コード例 #4
0
    def testForNonClosedTask(self):
        self.task.mentors = [self.profile.key()]
        statuses = [
            status for status in task_model.GCITask.status.choices
            if status != 'Closed'
        ]
        for status in statuses:
            self.task.status = status
            self.task.put()

            result = profile_logic.canResignAsMentorForOrg(
                self.profile, self.org.key())
            self.assertFalse(result)
コード例 #5
0
 def testForNoTasksAssigned(self):
     """Tests for a mentor with no tasks assigned."""
     result = profile_logic.canResignAsMentorForOrg(self.profile,
                                                    self.org.key())
     self.assertTrue(result)
コード例 #6
0
ファイル: test_profile.py プロジェクト: rhyolight/nupic.son
 def testForNoTasksAssigned(self):
   """Tests for a mentor with no tasks assigned."""
   result = profile_logic.canResignAsMentorForOrg(
       self.profile, self.org.key())
   self.assertTrue(result)