Exemplo n.º 1
0
 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())
Exemplo n.º 2
0
 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())