def test_all_configuration(self): neighbors = [] for file in self.files: # print file.split('/')[-1] configuration = Configuration([ file, ]) configuration.reload() self.assertEqual(check_neighbor(configuration.neighbor), True) del configuration
def test_all_configuration (self): neighbors = [] for filename in self.files: if filename.endswith(self.skip): continue print filename configuration = Configuration([filename,]) configuration.reload() self.assertEqual(check_neighbor(configuration.neighbor),True) del configuration
def test_all_configuration(self): neighbors = [] for filename in self.files: if filename.endswith(self.skip): continue print '-' * 80 print filename print '=' * 80 configuration = Configuration([ filename, ]) configuration.reload() self.assertEqual(check_neighbor(configuration.neighbor), True) del configuration
class TestPeer (unittest.TestCase): text_configuration = """\ neighbor 192.0.2.181 { description "a quagga test peer"; router-id 192.0.2.92; local-address 192.0.2.92; local-as 65000; peer-as 65000; static { route 10.0.5.0/24 next-hop 192.0.2.92 local-preference 10 community [ 0x87654321 ]; } } """ def setUp(self): self.configuration = Configuration(self.text_configuration,True) self.assertEqual(self.configuration.reload(),True,"could not read the configuration, run the configuration unittest") def test_connection (self): reactor = Reactor(self.configuration) reactor.run()
class TestPeer(unittest.TestCase): text_configuration = """\ neighbor 192.0.2.181 { description "a quagga test peer"; router-id 192.0.2.92; local-address 192.0.2.92; local-as 65000; peer-as 65000; static { route 10.0.5.0/24 next-hop 192.0.2.92 local-preference 10 community [ 0x87654321 ]; } } """ def setUp(self): self.configuration = Configuration(self.text_configuration, True) self.assertEqual( self.configuration.reload(), True, "could not read the configuration, run the configuration unittest") def test_connection(self): reactor = Reactor(self.configuration) reactor.run()