Exemple #1
0
    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")
Exemple #2
0
 def test_parse(self):
     self.assertIsNone(PutCommand.parse_response(ET.fromstring('<put_file />')))