'Edge betweenness centrality: balanced tree'

def test_balanced_tree(self):

    G = nx.balanced_tree(r=2, h=2)
    b = nx.edge_betweenness_centrality(G, weight=None, normalized=False)
    b_answer = {(0, 1): 12, (0, 2): 12, (1, 3): 6, (1, 4): 6, (2, 5): 6, (2, 6): 6}
    for n in sorted(G.edges()):
        assert_almost_equal(b[n], b_answer[n])
