Пример #1
0
def test_invalid_clan():
    client = Client()
    with pytest.raises(APIError):
        clan = client.get_clan('123445')
Пример #2
0
def test_endpoints():
    client = Client()
    endpoints = client.get_endpoints()
    assert_endpoints(endpoints)
Пример #3
0
def test_clan():
    client = Client()
    clan = client.get_clan('2CCCP')
    assert clan.name == 'Reddit Alpha'
    assert clan.badge.name == 'A_Char_Rocket_02'
Пример #4
0
def test_profile():
    client = Client()
    player = client.get_player('C0G20PR2')
    assert_player_model(player)
Пример #5
0
def test_tournament():
    client = Client()
    player = client.get_tournament('20LLGRLC')
    assert_tournament_model(player)
Пример #6
0
def test_top_local_clans():
    """Text top clans."""
    client = Client()
    locatiion = 'us'
    top_clans = client.get_top_clans(locatiion)
    assert_top_clans(top_clans, locatiion)
Пример #7
0
def test_clans():
    client = Client()
    clans = client.get_clans(['2CCCP', '2U2GGQJ'])
    assert_clans(clans)
Пример #8
0
def test_top_clans():
    """Text top clans."""
    client = Client()
    top_clans = client.get_top_clans()
    assert_top_clans(top_clans)
Пример #9
0
def test_popular_clans():
    """Text popular clans."""
    client = Client()
    popular_clans = client.get_popular_clans()
    assert_popular_clans(popular_clans)
Пример #10
0
def test_top_players():
    client = Client()
    top_players = client.get_top_players()
    assert_top_players(top_players)
Пример #11
0
def test_version():
    client = Client()
    version = client.get_version()
    assert_version(version)
Пример #12
0
def test_popular_players():
    """Text popular players."""
    client = Client()
    popular_players = client.get_popular_players()
    assert_popular_players(popular_players)