def test_rpcerror_repr(self):
     rsp = etree.XML(rpc_xml)
     obj = RpcError(rsp=rsp)
     err = 'RpcError(severity: error, bad_element: bgp, ' \
           'message: syntax error)'
     self.assertEqual(str, type(obj.__repr__()))
     self.assertEqual(obj.__repr__(), err)
 def test_rpcerror_repr(self):
     rsp = etree.XML(rpc_xml)
     obj = RpcError(rsp=rsp)
     err = 'RpcError(severity: error, bad_element: bgp, ' \
           'message: syntax error)'
     self.assertEqual(str, type(obj.__repr__()))
     self.assertEqual(obj.__repr__(), err)
Beispiel #3
0
 def test_rpcerror_repr(self):
     rsp = etree.XML('<root><a>test</a></root>')
     obj = RpcError(rsp=rsp)
     self.assertEquals(str, type(obj.__repr__()))
     self.assertEqual(obj.__repr__(), '<root>\n  <a>test</a>\n</root>\n')
 def test_rpcerror_repr(self):
     rsp = etree.XML('<root><a>test</a></root>')
     obj = RpcError(rsp=rsp)
     self.assertEquals(str, type(obj.__repr__()))
     self.assertEqual(obj.__repr__(), '<root>\n  <a>test</a>\n</root>\n')