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