def test_when_team_has_no_responses_expect_none(self): # ARRANGE section = Section() team = section.get_team('1', 'team 1') # ACT result = section.response_for_team(team) # ASSERT self.assertEqual(result, None)
def test_when_team_has_one_response_expect_one_response(self): # ARRANGE section = Section() team = section.get_team('1', 'team 1') response = Response(team=team) section.add_response(response) # ACT result = section.response_for_team(team) # ASSERT self.assertEqual(result, response)
def test_when_team_has_multiple_responses_expect_first(self): # ARRANGE section = Section() team = section.get_team('1', 'team 1') response1 = Response(team=team, timestamp='2020/11/01 20:00:00') section.add_response(response1) response2 = Response(team=team, timestamp='2020/11/01 19:00:00') section.add_response(response2) response3 = Response(team=team, timestamp='2020/11/01 21:00:00') section.add_response(response3) # ACT result = section.response_for_team(team) # ASSERT self.assertEqual(result, response2)