Ejemplo n.º 1
0
def test_vk_auth():
    login, passwd = get_login_password()

    from vkwrapper import Vk

    v = Vk(cache=FileCache(), login=login, password=passwd)

    l1 = v.get_friends("525008285")
    l2 = v.get_friends("288999853")

    # just type checks
    assert isinstance(l1, list) and isinstance(l2, list) and isinstance(
        l1[0], str) and isinstance(l2[-1], str)
Ejemplo n.º 2
0
def test_graph_creation():
    login, passwd = get_login_password()

    from vkwrapper import Vk
    from graphs import Graph

    v = Vk(cache=FileCache(), login=login, password=passwd)
    g = Graph(v, "238696131")
Ejemplo n.º 3
0
def test__graph_get_community_labels_sparse_graph():
    login, passwd = get_login_password()

    from vkwrapper import Vk
    from graphs import Graph

    v = Vk(cache=FileCache(), login=login, password=passwd)
    g = Graph(v, "148907612")

    g.get_community_labels()
Ejemplo n.º 4
0
def test_graph_get_community_labels():
    login, passwd = get_login_password()

    from vkwrapper import Vk
    from graphs import Graph

    v = Vk(cache=FileCache(), login=login, password=passwd)
    g = Graph(v, "238696131")

    g.get_community_labels()
Ejemplo n.º 5
0
def test_graph_duplicating_edges():
    login, passwd = get_login_password()

    from vkwrapper import Vk
    from graphs import Graph

    v = Vk(cache=FileCache(), login=login, password=passwd)
    g = Graph(v, "238696131")

    assert g.g.is_simple() == True