def create_test_game(player_names):
    deck = engine.create_deck()
    deck.shuffle()
    players = [models.Player(name) for name in player_names]
    game = engine.Game(players, 7, deck)

    return game
    def test_deal_player_hands(self):
        deck = engine.create_deck()
        player = models.Player("bob")
        player_two = models.Player("john")

        player_hands = engine.deal_player_hands(7, [player, player_two,], 
                deck)

        self.assertEquals(2, len(player_hands))

        player_hand_one = player_hands[player.name]
        self.assertEquals(player, player_hand_one.player)
        self.assertEquals(7, player_hand_one.hand.number_of_cards())

        player_hand_two = player_hands[player_two.name]
        self.assertEquals(player_two, player_hand_two.player)
        self.assertEquals(7, player_hand_two.hand.number_of_cards())
    def test_create_deck(self):
        deck = engine.create_deck()

        self.assertEquals(52, deck.number_of_cards())