def testTopDown(self): applyBriteFile(emu_config.basedir + "/testfiles/topdown.brite", [self.topology]) self.assertEquals(4, len(self.topology.autonomousSystems)) self.assertEquals(5, len(self.topology.autonomousSystems[7])) self.assertEquals("bot157", self.topology.autonomousSystems[9].botdict[157].name)
def testFlatRouter(self): applyBriteFile(emu_config.basedir + "/testfiles/flatrouter.brite", [self.topology]) self.assertEquals(2, len(self.topology.autonomousSystems)) self.assertEquals(2, len(self.topology.autonomousSystems[1])) self.assertEquals("bot1", self.topology.autonomousSystems[2].botdict[1].name)
def setUpClass(cls): cls.topology = BriteTopology(mn) applyBriteFile(emu_config.basedir + "/testfiles/topdown.brite", [cls.topology]) cls.topology.start()
def setUpClass(cls): cls.topology = BriteTopology(mininet=mn) applyBriteFile(emu_config.basedir + "/testfiles/flatrouter.brite", [cls.topology]) cls.topology.start()
def testReadToMockAccepter(self): accepter = MockAccepter() applyBriteFile(self.inputfilename, [accepter]) self.assertEquals("RTWaxman", accepter.model_name) self.assertEquals(3, accepter.num_nodes) self.assertEquals(5, accepter.num_edges)