def test_revive_heroes():
    heroes = []
    for _ in range(0, 20):
        heroes.append(create_hero(health=60))

    team_one = Team("One")
    for hero in heroes:
        team_one.add_hero(hero)

    team_one.defend(300)
    for hero in team_one.heroes:
        assert hero.health == 45
    team_one.revive_heroes()
    for hero in team_one.heroes:
        assert hero.health == 60
def test_team_defend():
    heroes = []
    for _ in range(0, 20):
        heroes.append(create_hero(health=20))
    team_one = Team("One")
    for hero in heroes:
        team_one.add_hero(hero)

    deaths = team_one.defend(100)
    for hero in team_one.heroes:
        assert hero.health == 15

    assert deaths == 0

    assert team_one.defend(400) == 20