Esempio n. 1
0
 def test_pod_valid_parent(self):
     """
     Tests that the parent class of the pod
     :return:
     """
     session = self.login_to_apic()
     parent = PhysicalModel()
     pod = Pod.get(session, parent)
     children = parent.get_children()
     self.assertEqual(pod, children)
Esempio n. 2
0
 def test_pod_valid_parent(self):
     """
     Tests that the parent class of the pod
     :return:
     """
     session = self.login_to_apic()
     parent = PhysicalModel()
     pod = Pod.get(session, parent)
     children = parent.get_children()
     self.assertEqual(pod, children)
Esempio n. 3
0
 def test_pod_valid_session(self):
     """
     Tests that the parent class of the pod
     :return:
     """
     session = 'bogus'
     parent = PhysicalModel()
     self.assertRaises(TypeError, Pod.get, session, parent)
Esempio n. 4
0
 def test_node_get_invalid_parent(self):
     session = self.login_to_apic()
     pod = PhysicalModel()
     self.assertRaises(TypeError, Node.get, session, parent=pod)