def trigger_at_start(id): serverboards.debug(repr(("add", start_triggers, id))) assert id not in start_triggers start_triggers.add(id) serverboards.info("Just triggers a tick at start: %s" % id) serverboards.rpc.event("trigger", state="tick", id=id) return id
def bad_protocol(*args): serverboards.debug("Invalid message") return True
def abort(*args, **kwargs): serverboards.debug("Pretend to work") time.sleep(0.500) serverboards.debug("Aborting") sys.exit(1)
def freepass(type="freepass", email="*****@*****.**", **kwargs): # use existing one, or fail serverboards.debug("Freepass for %s" % email) return email
def stop_trigger_at_start(id): serverboards.debug(repr(("del", start_triggers, id))) assert id in start_triggers start_triggers.remove(id) serverboards.info("Stop start trigger: %s" % id) return True
def auth_token(type="fake", token=None): serverboards.debug("Try auth by token: %s" % token) if token == "XXX": return '*****@*****.**' return False