def test_game_run_heroku(self): x_size = 775 y_size = 800 game = Game("Checkers 100", x_size, y_size, "1.png", 120) game.objects = dict() game.player_c = 1 game.computer_c = 1 game.objects[(game.kx * 5, game.ky * 4)] = Player_checkers(game.kx * 5, game.ky * 4, game.kx, (0, 0, 0)) game.objects[(game.kx * 8, game.ky)] = Computer_checkers(game.kx * 8, game.ky, game.kx, (255, 0, 0)) game.handle_mouse_down((game.kx * 5, game.ky * 4)) game.handle_events = MagicMock( return_value=game.handle_mouse_down((game.kx * 5, game.ky * 2))) conf = dict() conf['0'] = str(775 - game.kx * 8) + '-' + str( 800 - game.ky) + '-' + str( 775 - game.kx * 2) + '-' + str(800 - game.ky * 3) + '-0' game.get_config = MagicMock(return_value=conf) game.run_heroku() self.assertTrue(True)
def test_game_handle_events(self): x_size = 775 y_size = 800 game = Game("Checkers 100", x_size, y_size, "1.png", 120) game.handle_events() self.assertTrue(True)