예제 #1
0
def test_wrond_gamemode():
    assert functions.define_gamemode('') == '[ERROR] Incorrect game mode'
예제 #2
0
def test_shaft_arena():
    assert functions.define_gamemode('shaft_arena') == 'r_shaft_arena_1'
예제 #3
0
def test_wipeout():
    assert functions.define_gamemode('wipeout') == 'r_wo'
예제 #4
0
def test_rocket_arena():
    assert functions.define_gamemode('rocket_arena') == 'r_rocket_arena_2'
예제 #5
0
def test_ca():
    assert functions.define_gamemode('ca') == 'r_ca_2'
예제 #6
0
def test_ffa():
    assert functions.define_gamemode('ffa') == 'r_ca_1'
예제 #7
0
def test_macguffin():
    assert functions.define_gamemode('r_macguffin')
예제 #8
0
    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)