Skip to content

Commit

Permalink
Add a prepare_empty_game() utility function to tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jleclanche committed Jul 29, 2015
1 parent f5cd9f3 commit 48870e0
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions tests/test_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,19 @@ def prepare_game(hero1=None, hero2=None, exclude=(), game_class=BaseTestGame):
return game


def prepare_empty_game(game_class=BaseTestGame):
player1 = Player(name="Player1")
player1.prepare_deck([], random.choice(_heroes))
player1.cant_fatigue = True
player2 = Player(name="Player2")
player2.prepare_deck([], random.choice(_heroes))
player2.cant_fatigue = True
game = game_class(players=(player1, player2))
game.start()

return game


def test_cheat_destroy_deck():
game = prepare_game()
game.player1.discard_hand()
Expand Down

0 comments on commit 48870e0

Please sign in to comment.