def test_put_file(self): with tempfile.NamedTemporaryFile( ) as tmp1, tempfile.NamedTemporaryFile() as tmp2: tmp1.write('foo') tmp1.flush() SyncRemoteProcess.put_file('localhost', tmp1.name, tmp2.name) self.assertEqual('foo', tmp2.read())
def test_put_file(self): with tempfile.NamedTemporaryFile() as tmp1, tempfile.NamedTemporaryFile() as tmp2: tmp1.write('foo') tmp1.flush() SyncRemoteProcess.put_file('localhost', tmp1.name, tmp2.name) self.assertEqual('foo', tmp2.read())