def test_ai_play_a_game(self):
     ai = AI()
     self.assertEqual(ai.play(1), Game.IN_PROGRESS)
     self.assertEqual(ai.at(4), Game.O)
     self.assertEqual(ai.play(8), Game.IN_PROGRESS)
     self.assertEqual(ai.at(0), Game.O)
     self.assertEqual(ai.play(2), Game.IN_PROGRESS)
     self.assertEqual(ai.at(5), Game.O)
     self.assertEqual(ai.play(6), Game.O_WINS)
 def assertOposites(self, expected_oposite, given_oposite, board=None):
     ai = AI(board)
     ai.play(given_oposite)
     self.assertEqual(ai.at(expected_oposite), Game.O)