def test_can_create_random_goalie_with_proper_rates(self): offset_size = 2 median = 50 min_val = median - (7 * offset_size) max_val = median + (7 * offset_size) player = GoalKeeper.generate(number=1, median=median, offset_size=offset_size) assert player.speed >= min_val and player.speed <= max_val, player assert player.agility >= min_val and player.agility <= max_val, player assert player.stamina >= min_val and player.stamina <= max_val, player assert player.offense <= max_val, player assert player.defense >= min_val and player.defense <= max_val, player assert player.anticipation >= min_val and player.anticipation <= max_val, player assert player.positioning >= min_val and player.positioning <= max_val, player assert player.jumping >= min_val and player.jumping <= max_val, player
def test_can_create_random_goalie(self): player = GoalKeeper.generate(number=1, median=50) assert player.__class__ == GoalKeeper, player.__class__ assert player.name assert player.number == 1