def test_tool_file_rewrite(self):
        self.client_job_description.rewrite_paths = True
        tool_dir = os.path.abspath(self.tool.tool_dir)
        command_line = "python %s/tool1_wrapper.py" % tool_dir
        self.client_job_description.command_line = command_line
        rewritten_command_line = "python /pulsar/staging/1/tools/tool1_wrapper.py"
        self.client.expect_put_paths(["/pulsar/staging/1/tools/tool1_wrapper.py"])
        self.client.expect_command_line(rewritten_command_line)
        self._submit()
        uploaded_file1 = self.client.put_files[0]
        assert uploaded_file1[1] == "tool"
        self.assertEquals(uploaded_file1[0], "%s/tool1_wrapper.py" % tool_dir)
dataset/ETHPy150Open galaxyproject/pulsar/test/client_staging_test.py/TestStager.test_tool_file_rewrite/original