예제 #1
0
    def test_set_cableplan_attributes(self):
        cps = CablePlan.get(self.session)
        testcp = cps[0]

        for method in dir(testcp):
            if method.startswith('set_'):
                a = getattr(testcp, method)
                a('foo')
예제 #2
0
    def test_set_cableplan_attributes(self):
        cps = CablePlan.get(self.session)
        testcp = cps[0]

        for method in dir(testcp):
            if method.startswith('set_'):
                a = getattr(testcp, method)
                a('foo')
예제 #3
0
 def test_get_cableplans(self):
     cps = CablePlan.get(self.session)
     self.assertIsInstance(cps, list)
     print "Cable Plans Received"
     for cp in cps:
         print 'Switch {} port {} connected to switch {} port {}'.format(
             cp.attributes['sourceSwitch'], cp.attributes['sourcePort'],
             cp.attributes['destSwitch'], cp.attributes['destPort'])
     self.assertIsInstance(cps[0], CablePlan)
예제 #4
0
 def test_get_cableplans(self):
     cps = CablePlan.get(self.session)
     self.assertIsInstance(cps, list)
     print "Cable Plans Received"
     for cp in cps:
         print 'Switch {} port {} connected to switch {} port {}'.format(
                                                                 cp.attributes['sourceSwitch'],
                                                                 cp.attributes['sourcePort'],
                                                                 cp.attributes['destSwitch'],
                                                                 cp.attributes['destPort'])
     self.assertIsInstance(cps[0], CablePlan)
예제 #5
0
 def test_create_cable_plan(self):
     cp = CablePlan()
     self.assertIsInstance(cp, CablePlan)