def test_wrond_gamemode(): assert functions.define_gamemode('') == '[ERROR] Incorrect game mode'
def test_shaft_arena(): assert functions.define_gamemode('shaft_arena') == 'r_shaft_arena_1'
def test_wipeout(): assert functions.define_gamemode('wipeout') == 'r_wo'
def test_rocket_arena(): assert functions.define_gamemode('rocket_arena') == 'r_rocket_arena_2'
def test_ca(): assert functions.define_gamemode('ca') == 'r_ca_2'
def test_ffa(): assert functions.define_gamemode('ffa') == 'r_ca_1'
def test_macguffin(): assert functions.define_gamemode('r_macguffin')
print(str(create_parser()) + 'OLOLOLOLOLOLOLOLOLOLO') parser = create_parser() my = parser.parse_args(sys.argv[1:]) # Set counters back to zero cfg.basic_counter = 0 cfg.message = False cfg.temp_url = '' # Creating request query = q(my.mode, my.count, my.user_id, my.country, cfg.basic_offset, cfg.basic_counter) # Creating URL. Depends on input arguments if my.user_id is not None: cfg.temp_url = cfg.url_user_id + query.user_id q.parse(query, cfg.temp_url) elif my.country is not None: cfg.temp_url = cfg.url_country + 'mode=' + str( functions.define_gamemode(query.mode)) + '&offset=' q.parse(query, cfg.temp_url + str(query.offset)) elif my.mode is not None: cfg.temp_url = cfg.url_leaderboard + 'mode=' + str( functions.define_gamemode(query.mode)) + '&offset=' q.parse(query, cfg.temp_url + str(query.offset)) else: print(cfg.err_no_attr)