예제 #1
0
def test_get_my_graphs():
    graphspace = GraphSpace('*****@*****.**', 'user1')
    # response = graphspace.get_public_graphs(tags=['2015-bioinformatics-xtalk', 'kegg-curated-top-rank-FPs'])
    graphs = graphspace.get_my_graphs()
    assert all(isinstance(x, Graph) for x in graphs)
    assert len(graphs) > 0
예제 #2
0
def test_user_not_authenticated_error():
    graphspace = GraphSpace('*****@*****.**', 'WrongPassword')
    with pytest.raises(errors.UserNotAuthenticated) as err:
        graphspace.get_my_graphs()
예제 #3
0
def test_get_my_graphs():
    graphspace = GraphSpace('*****@*****.**', 'user1')
    graphspace.set_api_host('localhost:8000')
    # response = graphspace.get_public_graphs(tags=['2015-bioinformatics-xtalk', 'kegg-curated-top-rank-FPs'])
    response = graphspace.get_my_graphs()
    assert response is not None and len(response['graphs']) > 0