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)
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)
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)
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)
def testForNoTasksAssigned(self): """Tests for a mentor with no tasks assigned.""" result = profile_logic.canResignAsMentorForOrg(self.profile, self.org.key()) self.assertTrue(result)
def testForNoTasksAssigned(self): """Tests for a mentor with no tasks assigned.""" result = profile_logic.canResignAsMentorForOrg( self.profile, self.org.key()) self.assertTrue(result)