예제 #1
0
 def get_rows_for_template(self):
     session_rows = []
     contador = 0
     for session in Talk.get_talk_sessions():
         row = SessionRow(session)
         for room in Room.get_rooms():
             if self.grid[session][room.name]:
                 self.grid[session][room.name].contador = contador
             row.add_talk(self.grid[session][room.name])
             contador = contador + 1
         session_rows.append(row)
     return session_rows
예제 #2
0
 def test_add_talks(self):
     talk = Talk(title='Charla1')
     talk2 = Talk(title='Charla2')
     row = SessionRow(1)
     row.add_talk(talk)
     row.add_talk(talk2)
     self.assertEqual([talk, talk2], row.talks_by_room())