Unverified Commit a75bca59 authored by mvdbeek's avatar mvdbeek
Browse files

Add test

parent 91660b9d
Loading
Loading
Loading
Loading
+18 −0
Original line number Diff line number Diff line
@@ -2511,6 +2511,24 @@ class TestToolsApi(ApiTestCase, TestsTools):
                exception_raised = e
            assert exception_raised, "Expected invalid column selection to fail job"

    @skip_without_tool("implicit_conversion_format_input")
    def test_implicit_conversion_input_dataset_tracking(self):
        with self.dataset_populator.test_history() as history_id:
            compressed_path = self.test_data_resolver.get_filename("1.fastqsanger.gz")
            with open(compressed_path, "rb") as fh:
                dataset = self.dataset_populator.new_dataset(
                    history_id, content=fh, file_type="fastqsanger.gz", wait=True
                )
            outputs = self._run(
                "Grep1", history_id=history_id, inputs={"data": {"src": "hda", "id": dataset["id"]}}, assert_ok=True
            )
            job_details = self.dataset_populator.get_job_details(outputs["jobs"][0]["id"], full=True).json()
            assert job_details["inputs"]["input"]["id"] != dataset["id"]
            converted_input = self.dataset_populator.get_history_dataset_details(
                history_id=history_id, content_id=job_details["inputs"]["input"]["id"]
            )
            assert converted_input["extension"] == "fastqsanger"

    @skip_without_tool("column_multi_param")
    def test_implicit_conversion_and_reduce(self):
        with self.dataset_populator.test_history() as history_id: