

@pytest.mark.gen_test
def test_graph_disable(session, graph, users, groups, user_admin_perm_to_auditors, http_client, base_url):
    graph.update_from_db(session)
    old_users = graph.users
    assert (sorted(old_users) == sorted(users.keys()))
    username = 'oliver@a.co'
    fe_url = url(base_url, '/users/{}/disable'.format(username))
    resp = (yield http_client.fetch(fe_url, method='POST', headers={
        'X-Grouper-User': 'zorkian@a.co',
    }, body=urlencode({
        
    })))
    assert (http_client.code == 200)
    graph.update_from_db(session)
    assert (len(graph.users) == (len(old_users) - 1)), 'disabled user removed from graph'
    assert (username not in graph.users)

dataset/ETHPy150Open dropbox/grouper/tests/test_users.py test_graph_disable/VarMisuse@116/175 `resp`->`http_client`