class Login(unittest.TestCase): def setUp(self): self.client = ShowdownClient() def test_login(self): self.client.login('fear27', 'blurnfear') def tearDown(self): pass
def main(): client = ShowdownClient() with open('config.json', 'r') as f: config = json.load(f) client.login(**config['login']) time.sleep(1) battle = client.challenge('chabons') if(battle): #Start a terminal terminal = code.InteractiveConsole(locals=locals()) terminal.push('from showdown_client import ShowdownClient') terminal.push('from showdown_battle import ShowdownBattle, Player') terminal.interact()