Esempio n. 1
0
async def main():
    agent = start_agent()
    start_game(GAME_FILE_NAME)

    while True:
        print_game_response()
        cmd = input()

        should_exit = await process_command(cmd.lower(), agent)

        if should_exit:
            break

    stop_agent(agent)
Esempio n. 2
0
 def stop(self, backend):
     utils.stop_agent()
Esempio n. 3
0
def main():
    agent = start_agent()
    input("Press ENTER to exit.\n\n")
    stop_agent(agent)
Esempio n. 4
0
 def test_stop_agent(self):
     stop_agent()
     self.assertEqual(self.svc_ctl_call_count, 1)
     self.assertEqual(self.service_names, ['juju-api-agent'])
     self.assertEqual(self.actions, [charmhelpers.STOP])