def testSetProperties(self): tvrpc = gfibertv.GFiberTvMailbox('http://localhost:%d' % srv_port) tvrpc.Node = 'Node1' tvrpc.Name = 'Prop1' tvrpc.Value = 'Prop1NewValue' self.assertEqual(tvrpc.Value, 'Prop1NewValue') tvrpc.Name = 'Prop4' self.assertRaises(IndexError, lambda: tvrpc.Value) tvrpc.Node = 'Node3' self.assertRaises(IndexError, lambda: tvrpc.Value)
def testNodeList(self): tvrpc = gfibertv.GFiberTvMailbox('http://localhost:%d' % srv_port) self.assertEqual(tvrpc.NodeList, 'Node1, Node2')
def testSetPropertiesProtocolError(self): tvrpc = gfibertv.GFiberTvMailbox('http://localhost:2') tvrpc.Node = 'Node1' tvrpc.Name = 'Prop1' self.assertRaises(IndexError, lambda: tvrpc.SetValue(1))