Example #1
0
 def test_children_concrete_classes(self):
     """
     Test ConcreteArpDomain _get_children_concrete_classes returns something list-like
     """
     node_id = '103'
     node = Node(node_id)
     concreteArp = ConcreteArp(node)
     concreteArpDomain = ConcreteArpDomain(concreteArp)
     self.assertTrue(
         isinstance(
             concreteArpDomain._get_children_concrete_classes(),
             list))
     for child in concreteArpDomain._get_children_concrete_classes():
         self.assertFalse(isinstance(child, ConcreteArpEntry))
Example #2
0
 def test_get_name_from_dn(self):
     """
     Test that ConcreteArpDomain._get_name_from_dn returns the name
     derived from the dn provided
     """
     dn = 'topology/pod-1/node-103/sys/arp/inst/dom-Tenant1:T1-CTX2'
     self.assertEquals(
         ConcreteArpDomain._get_name_from_dn(dn),
         'Tenant1:T1-CTX2')
Example #3
0
 def test_get_parent_class(self):
     """
     Ensure class has the correct parent class
     """
     self.assertEquals(ConcreteArpDomain._get_parent_class(), ConcreteArp)