def test_reserve_maximum(self): man = TopologyManager(CONFIG_FILE) topo = man.get_topology() # Get a path path = nx.shortest_path(topo, source="atl-switch", target="mia-switch") man.reserve_bw_on_path(path, 80000000000)
def test_unreserve_too_much(self): man = TopologyManager(CONFIG_FILE) topo = man.get_topology() # Get a path path = nx.shortest_path(topo, source="atl-switch", target="mia-switch") man.reserve_bw_on_path(path, 100) man.unreserve_bw_on_path(path, 100) self.failUnlessRaises(Exception, man.unreserve_bw_on_path, path, 100) man.reserve_bw_on_path(path, 100) self.failUnlessRaises(Exception, man.unreserve_bw_on_path, path, 200)