def test_login(self): cli = FXGame() assert cli.isLoggedIn() is False cli.login(username, password) assert cli.isLoggedIn() is True cli.logout() assert cli.isLoggedIn() is False
def test_logfile(self): logfn = tempfile.NamedTemporaryFile() cli = FXGame() cli.setLogfile(logfn.name) cli.login(username, password) cli.logout() contents = open(logfn.name).read() assert len(contents) > 0