示例#1
0
 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)
示例#2
0
 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 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 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)
示例#8
0
 def setUpClass(cls):
     cls.topology = BriteTopology(mininet=mn)
     applyBriteFile(emu_config.basedir + "/testfiles/flatrouter.brite",
                    [cls.topology])
     cls.topology.start()
示例#9
0
 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)
示例#10
0
 def setUpClass(cls):
     cls.topology = BriteTopology(mn)
     applyBriteFile(emu_config.basedir + "/testfiles/topdown.brite",
                    [cls.topology])
     cls.topology.start()