Created
July 13, 2015 08:17
-
-
Save synap5e/c66eaedce0594c0eca88 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import sys; sys.path.append("..") | |
from fireplace.cards.heroes import * | |
from test_main import prepare_game | |
IMP_GANG_BOSS = 'BRM_006' | |
IMP = 'BRM_006t' | |
def test_self_damage(): | |
game = prepare_game(hero1=MAGE, hero2=MAGE) | |
# summon 2 Imp Gang Boss | |
boss1 = game.current_player.summon(IMP_GANG_BOSS) | |
boss2 = game.current_player.summon(IMP_GANG_BOSS) | |
game.end_turn() | |
# attack one of the bosses | |
game.current_player.hero.power.use(target=boss1) | |
# string ids of all the opponents minions | |
ids = [ent.id for ent in game.current_player.opponent.field] | |
# only one gang boss was hit, so there should only be one imp | |
assert(ids.count(IMP) == 1) | |
def main(): | |
test_self_damage() | |
print("All tests ran OK") | |
if __name__ == "__main__": | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Relevant output of log