Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class TestUnsupportedOperationExceptionTranslation(TestCaseWithSFTPServer):
- """Test that unsupported operation exception from Paramiko is correctly
- translated into TransportOperationNotSupported."""
- def test_sftp_unsupported_rename_operation(self):
- t = self.get_transport()
- e = self.assertRaises(
- errors.TransportOperationNotSupported("rename",
- "unable to rename"),
- t._translate_io_exception,
- IOError("Operation unsupported"),
- "unable to rename", operation="rename")
- self.assertEquals(e, "TransportOperationNotSupported: Transport operation is not supported: rename")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement