#NEWLINE# def testPut( self ) : #NEWLINE# #INDENT# "\n        Check that 'put' uploads files correctly and that they can be\n        successfully removed. Also check the output of the put command.\n        " #NEWLINE# expectedOutput = ( 'Transferred %s/testfile1 to %s/%s/test"file2' % ( self . testDir , os . getcwd ( ) , self . testDir ) ) #NEWLINE# def _checkPut( result ) : #NEWLINE# #INDENT# self . assertFilesEqual ( ( self . testDir + '/testfile1' ) , ( self . testDir + '/test"file2' ) ) #NEWLINE# self . assertTrue ( result . endswith ( expectedOutput ) ) #NEWLINE# return self . runCommand ( 'rm "test\\"file2"' ) #NEWLINE# #UNINDENT# d = self . runCommand ( ( 'put %s/testfile1 "test\\"file2"' % ( d . testDir , ) ) ) #NEWLINE# d . addCallback ( _checkPut ) #NEWLINE# d . addCallback ( ( lambda _ : self . assertFalse ( os . path . exists ( ( self . testDir + '/test"file2' ) ) ) ) ) #NEWLINE# return d