def test_parse_error(self): errinfo = DeleteCommand.parse_response( ET.fromstring(ERROR_BLOCK.format(command='rm', errno=1, errtext="error text"))) self.assertEqual(errinfo.errno, 1) self.assertEqual(errinfo.message, "error text")
def test_parse(self): self.assertIsNone(DeleteCommand.parse_response(ET.fromstring('<rm />')))