'Edge betweenness centrality: C4'

def test_C4(self):

    G = nx.cycle_graph(4)
    b = nx.edge_betweenness_centrality(G, weight='weight', normalized=False)
    b_answer = {(0, 1): 2, (0, 3): 2, (1, 2): 2, (2, 3): 2}
    for n in sorted(G.edges()):
        assert_almost_equal(b[n], b_answer[n])
