def test_put_file_should_save_file_both_locally_and_remotely(self):
        temp_file = os.path.join(self.temp_dir, 'put.txt')
        with open(temp_file, 'w') as tf:
            tf.write('hello')

        self.client.put_file('/put.txt', temp_file)

        cache_path = os.path.join(self.cache_dir, 'files', 'put.txt')
        remote_path = os.path.join(self.server_dir, 'links', 'put.txt')

        self.assertTrue(os.path.exists(cache_path))
        self.assertTrue(os.path.exists(remote_path))

        with open(cache_path, 'r') as cf:
            self.assertEqual(cf.read(), 'hello')

        rf, _ = self.client.get_stream('/put.txt')
        self.assertEqual(rf.read(), b'hello')