daily pastebin goal
67%
SHARE
TWEET

test_sftp_transport.py

a guest Jul 27th, 2012 1 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")
RAW Paste Data
Pastebin PRO WINTER Special!
Get 40% OFF Pastebin PRO accounts!
Top