class TestFunctions(unittest.TestCase): def setUp(self): self.ovs = OVSDB() def test_list_dbs(self): db_list = self.ovs.get_dbs() db_name = db_list['result'][0] self.assertEqual(db_name, 'Open_vSwitch') def test_list_br(self): bridge_list = self.ovs.list_bridges() bridges = bridge_list['Bridge'] #print bridges #print bridges.values()[0]['new']['name'] self.assertTrue("br0" in bridges.values()[0]['new']['name']) def test_choice(self): self.assertTrue(True)
def setUp(self): self.ovs = OVSDB()