Advertisement
Guest User

test_sftp_transport.py

a guest
Jul 27th, 2012
11
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. class TestUnsupportedOperationExceptionTranslation(TestCaseWithSFTPServer):
  2.     """Test that unsupported operation exception from Paramiko is correctly
  3.    translated into TransportOperationNotSupported."""
  4.  
  5.     def test_sftp_unsupported_rename_operation(self):
  6.         t = self.get_transport()
  7.  
  8.         e = self.assertRaises(
  9.             errors.TransportOperationNotSupported("rename",
  10.                           "unable to rename"),
  11.                           t._translate_io_exception,
  12.                           IOError("Operation unsupported"),
  13.                           "unable to rename", operation="rename")
  14.         self.assertEquals(e, "TransportOperationNotSupported: Transport operation is not supported: rename")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement