

def test_get_network_tree(self):
    res = get_network_tree()
    correct = [{
        'network': self.net1,
        'subnetworks': [{
            'network': self.net2,
            'subnetworks': [],
        }, {
            'network': self.net3,
            'subnetworks': [{
                'network': self.net4,
                'subnetworks': [],
            }],
        }, {
            'network': self.net4,
            'subnetworks': [],
        }],
    }, {
        'network': self.net5,
        'subnetworks': [],
    }]
    self.assertEquals(res, correct)

dataset/ETHPy150Open allegro/ralph/src/ralph/data_center/tests/test_models.py NetworkTest.test_get_network_tree/original