code: def test_export_filenames_and_read_urls_by_tag_id(
      mocker: MockerFixture,
  ) -> None:
      dataset_id = utils.generate_id()
      mocked_paginate = mocker.patch.object(
          api_utils,
          "paginate_endpoint",
          side_effect=[
              iter(["file0\nfile1"]),
              iter(["read_url0\nread_url1"]),
              iter(["datasource_url0\ndatasource_url1"]),
          ],
      )
      mocker.patch.object(
          ApiWorkflowClient, "__init__", return_value=None
      )
      mocked_api = mocker.MagicMock()
  
      client = ApiWorkflowClient()
      client._dataset_id = dataset_id
      client._tags_api = mocked_api
      data = client.export_filenames_and_read_urls_by_tag_id(
          tag_id="tag_id"
      )
  
      assert data == [
          {
              "fileName": "file0",
              "readUrl": "read_url0",
              "datasourceUrl": "datasource_url0",
          },
          {
              "fileName": "file1",
              "readUrl": "read_url1",
              "datasourceUrl": "datasource_url1",
          },
      ]
      mocked_paginate.assert_has_calls(
          [
              mocker.call(
                  mocked_api.export_tag_to_basic_filenames,
                  dataset_id=dataset_id,
                  tag_id="tag_id",
                  file_name_format=FileNameFormat.NAME,
              ),
              mocker.call(
                  mocked_api.export_tag_to_basic_filenames,
                  dataset_id=dataset_id,
                  tag_id="tag_id",
                  file_name_format=FileNameFormat.REDIRECTED_READ_URL,
              ),
              mocker.call(
                  mocked_api.export_tag_to_basic_filenames,
                  dataset_id=dataset_id,
                  tag_id="tag_id",
                  file_name_format=FileNameFormat.DATASOURCE_FULL,
              ),
          ]
      )
  
file_path: lightly/tests/api_workflow/test_api_workflow_export.py
imports: from pytest_mock import MockerFixture
  from lightly.api import ApiWorkflowClient, api_workflow_export
  from lightly.api import utils
  from lightly.openapi_generated.swagger_client.models import FileNameFormat, TagData
  from tests.api_workflow import utils
label_desc: Use image node_id 4 for calling a global function with example usage: test_export_filenames_and_read_urls_by_tag_id(mocker) without return types