code: def test_track_to_new_artifact_calls_upload(
      self,
      upload_artifact_files_metadata,
      create_new_artifact,
      _extract_file_list,
      _compute_artifact_hash_without_metadata,
  ):
      # given
      swagger_mock = self._get_swagger_mock()
      _compute_artifact_hash_without_metadata.return_value = (
          self.artifact_hash
      )
      _extract_file_list.return_value = self.files
      create_new_artifact.return_value = ArtifactModel(
          received_metadata=False,
          hash=self.artifact_hash,
          size=len(self.files),
      )
  
      # when
      track_to_new_artifact(
          swagger_client=swagger_mock,
          project_id=self.project_id,
          path=["sub", "one"],
          parent_identifier=self.parent_identifier,
          entries=[("/path/to/file", "/path/to")],
          default_request_params={},
          exclude_directory_files=True,
          exclude_metadata_from_hash=True,
      )
  
      # then
      upload_artifact_files_metadata.assert_called_once_with(
          swagger_client=swagger_mock,
          project_id=self.project_id,
          artifact_hash=self.artifact_hash,
          files=[self.files[0]],
          default_request_params={},
      )
  
file_path: neptune-client/tests/unit/neptune/new/internal/backends/test_hosted_artifact_operations.py
imports: import unittest
  import uuid
  from mock import MagicMock, patch
  from neptune.exceptions import ArtifactUploadingError
  from neptune.internal.artifacts.types import ArtifactFileData
  from neptune.internal.backends.api_model import ArtifactModel
  from neptune.internal.backends.hosted_artifact_operations import track_to_existing_artifact, track_to_new_artifact
label_desc: Use image node_id 3 for calling the TestHostedArtifactOperations obj's underlying member method code with example usage: obj.test_track_to_new_artifact_calls_upload(upload_artifact_files_metadata, create_new_artifact, _extract_file_list, _compute_artifact_hash_without_metadata) without return types