def test_with_defaults(self): line = ['Date', 'Team', 'Answer1', 'Answer2', 'Answer3'] # ACT result = Section._read_line(line) # ASSERT self.assertEqual(result.team_id, 'Team') self.assertEqual(result.team_name, 'Team') self.assertEqual(result.fields, ['Answer1', 'Answer2', 'Answer3'])
def test_with_different_id_column(self): line = ['Date', 'Fluff', 'Team', 'Answer1', 'Answer2', 'Answer3'] # ACT result = Section._read_line(line, teamid_column=2) # ASSERT self.assertEqual(result.team_id, 'Team') self.assertEqual(result.team_name, 'Team') self.assertEqual(result.fields, ['Fluff', 'Answer1', 'Answer2', 'Answer3'])
def test_with_teamname(self): line = [ 'Date', 'Team name', 'Team id', 'Answer1', 'Answer2', 'Answer3' ] # ACT result = Section._read_line(line, teamid_column=2, teamname_column=1) # ASSERT self.assertEqual(result.team_id, 'Team id') self.assertEqual(result.team_name, 'Team name') self.assertEqual(result.fields, ['Answer1', 'Answer2', 'Answer3'])