Ejemplo n.º 1
0
  def test_configuration_adding_and_size(self):
    ''' test that we can add to a configuration and obtain size '''
    slots = ['QB', 'RB', 'RB', 'WR', 'WR', 'TE', 'FLEX', 'K', 'D']
    config = Configuration(slots, 100000)

    player = Player('Dez Bryant', 'WR', 13.9, 14750)
    player2 = Player('Doug Martin', 'RB', 17.1, 16300)
    config.add_player(player, 'WR1')
    config.add_player(player2, 'RB1')
    self.assertEquals(config.get_value(), 31)
    self.assertEquals(config.get_cost(), 31050)
    self.assertEquals(len(config.get_config()), len(slots))