def test_parsing_access_token_option():
    # arrange
    run_execution_id = "ABCDEDF"
    project_id = "549f15d3-1e72-4ff1-815d-6355feaed297"
    access_token = "access-token"
    downloader = UnitySimulationDownloader(access_token=access_token)

    # act
    downloader.parse_source_uri(f"usim://{project_id}/{run_execution_id}")

    # assert
    assert downloader.run_execution_id == run_execution_id
    assert downloader.project_id == project_id
    assert downloader.access_token == access_token
def test_download_with_invalid_source_uri(
    access_token, project_id, run_execution_id
):
    # arrange
    downloader = UnitySimulationDownloader(access_token=access_token)

    # assert
    with pytest.raises(ValueError):
        # act
        downloader.parse_source_uri(
            f"usim://access_token_to_be_overridden@"
            f"{project_id}/{run_execution_id}"
        )
        downloader.parse_source_uri(
            f"usim://access_token_to_be_overridden"
            f"{project_id}/{run_execution_id}"
        )
        downloader.parse_source_uri(f"usim://{project_id}/{run_execution_id}")
        downloader.parse_source_uri(
            f"usim://{access_token}@{project_id}/{run_execution_id}"
        )
        downloader.parse_source_uri(
            f"usim://{access_token}@@{project_id}/{run_execution_id}"
        )