def METHOD_NAME(self):
    G = nx.Graph()
    with pytest.raises(nx.NetworkXError):
        nx.average_degree_connectivity(G, target="bogus")
    with pytest.raises(nx.NetworkXError):
        nx.average_degree_connectivity(G, source="bogus")