def create_game_api(self, app, docker_from_env): game_runner = GameRunner( worker_manager_class=LocalWorkerManager, game_state_generator=lambda avatar_manager: MockGameState(), django_api_url='http://test', port='0000') return service.GameAPI(game_state=game_runner.game_state, worker_manager=game_runner.worker_manager)
def game_api(app, socketio_server, game_id): game_runner = GameRunner( game_state_generator=lambda avatar_manager: MockGameState(), communicator=MockCommunicator(), port="0000", worker_manager_class=MockWorkerManager, ) return service.GameAPI( game_state=game_runner.game_state, worker_manager=game_runner.worker_manager, application=app, server=socketio_server, )
def setUpClass(cls): """ Register the api endpoints """ cls.game_api = service.GameAPI(worker_manager=None, game_state=MockGameState(None, None))