def test_observeBasicGame(self): agent1 = DoNothingBot() agent2 = DoNothingBot() game = Game([self.deck1, self.deck2], [agent1, agent2]) string = io.StringIO() obs = Observer(string) obs.observe(game) game.start() self.assertEqual(6905, len(string.getvalue()))
def test_first_turn(self): card_set1 = [] card_set2 = [] for cardIndex in range(0, 30): card_set1.append(card_lookup("Stonetusk Boar")) card_set2.append(card_lookup("Novice Engineer")) deck1 = Deck(card_set1, CHARACTER_CLASS.DRUID) deck2 = Deck(card_set2, CHARACTER_CLASS.MAGE) agent1 = unittest.mock.Mock(spec=DoNothingBot(), wraps=DoNothingBot()) agent2 = unittest.mock.Mock(spec=DoNothingBot(), wraps=DoNothingBot()) game = Game([deck1, deck2], [agent1, agent2]) game.start()