예제 #1
0
    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")
예제 #2
0
 def test_parse(self):
     self.assertIsNone(DeleteCommand.parse_response(ET.fromstring('<rm />')))