def create_contest(): start_time = datetime.datetime.utcnow() stop_time = start_time + datetime.timedelta(1, 0, 0) contest_id = add_contest( name="testcontest1", description="A test contest #1.", start=start_time.strftime("%Y-%m-%d %H:%M:%S.%f"), stop=stop_time.strftime("%Y-%m-%d %H:%M:%S.%f"), timezone=get_system_timezone(), token_initial="100", token_max="100", token_total="100", token_min_interval="0", token_gen_time="0", token_gen_number="0", ) info("Created contest %d." % contest_id) return contest_id
def create_contest(): info("Creating contest.") start_time = datetime.datetime.utcnow() stop_time = start_time + datetime.timedelta(1, 0, 0) contest_id = add_contest( name="testcontest1", description="A test contest #1.", start=start_time.strftime("%Y-%m-%d %H:%M:%S.%f"), stop=stop_time.strftime("%Y-%m-%d %H:%M:%S.%f"), timezone=get_system_timezone(), token_initial="100", token_max="100", token_total="100", token_min_interval="0", token_gen_time="0", token_gen_number="0", ) start_service("ScoringService", contest=contest_id) start_service("EvaluationService", contest=contest_id) start_server("ContestWebServer", contest=contest_id) return contest_id