예제 #1
0
 def test_summed_capacity_for_team_command_returns_zero_array_if_no_capacity_is_there(
         self):
     """Tests the calculation of the Daily capacity of a team for a Sprint"""
     cmd_daily_capacity = TeamController.CalculateSummedCapacityCommand(
         self.env, sprint=self.sprint)
     capacity = self.controller.process_command(cmd_daily_capacity)
     self.assert_equals(0, capacity)
예제 #2
0
    def test_can_sum_capacity_for_team(self):
        self.sprints_can_start_and_end_anytime()
        self.sprint.start = datetime(2009, 8, 1, 00, 00, tzinfo=utc)
        self.sprint.end = datetime(2009, 8, 10, 23, 59, tzinfo=utc)
        self.sprint.save()
        self.teh.create_member('Foo', self.sprint.team)

        cmd_daily_capacity = TeamController.CalculateSummedCapacityCommand(
            self.env, sprint=self.sprint, team=self.sprint.team)
        capacity_per_day = self.controller.process_command(cmd_daily_capacity)
        self.assert_almost_equals(36, capacity_per_day, max_delta=.01)