def test_get_name_from_dn(self): """ Test that ConcreteVpc._get_name_from_dn returns the name derived from the dn provided """ dn = 'topology/pod-1/node-103/sys/vpc' self.assertEquals(ConcreteVpc._get_name_from_dn(dn), '')
def test_get_table(self): """ Test ConcreteVpc create table function """ node1 = Node('103') node2 = Node('102') concreteVpc1 = ConcreteVpc(node1) concreteVpc2 = ConcreteVpc(node2) concreteVpc1.attr['admin_state'] = 'enabled' concreteVpc2.attr['admin_state'] = 'enabled' concreteVpc1.attr['dom_present'] = True concreteVpc2.attr['dom_present'] = True concreteVpcs = [concreteVpc1, concreteVpc2] self.assertTrue( isinstance( ConcreteVpc.get_table(concreteVpcs)[0], Table))
def test_get_parent_class(self): """ Ensure class has the correct parent class """ self.assertEquals(ConcreteVpc._get_parent_class(), Node)