예제 #1
0
 def test_children_concrete_classes(self):
     """
     Test ConcreteCdpAdjEp _get_children_concrete_classes returns something list-like
     """
     node_id = '103'
     node = Node(node_id)
     concreteCdp = ConcreteCdp(node)
     concreteCdpIf = ConcreteCdpIf(concreteCdp)
     concreteCdpAdjEp = ConcreteCdpAdjEp(concreteCdpIf)
     self.assertTrue(
         isinstance(
             concreteCdpAdjEp._get_children_concrete_classes(),
             list))
     self.assertTrue(
         len(concreteCdpAdjEp._get_children_concrete_classes()) == 0)
예제 #2
0
 def test_get_name_from_dn(self):
     """
     Test that ConcreteCdpAdjEp._get_name_from_dn returns the name
     derived from the dn provided
     """
     dn = 'topology/pod-1/node-103/sys/cdp/inst/if-[eth1/17]/adj-1'
     self.assertEquals(ConcreteCdpAdjEp._get_name_from_dn(dn), '1')
예제 #3
0
 def test_get_parent_class(self):
     """
     Ensure class has the correct parent class
     """
     self.assertEquals(ConcreteCdpAdjEp._get_parent_class(), ConcreteCdpIf)