code: def test_assign(self, get_operation_processor):
      def get_tmp_uploaded_file_name(tmp_upload_dir):
          """Get tmp file to uploaded from `upload_path`
          - here's assumption that we upload only one file per one path in test
          """
          uploaded_files = os.listdir(tmp_upload_dir)
          assert len(uploaded_files) == 1
          return uploaded_files[0]
  
      a_text = "Some text stream"
      a_binary = b"Some binary stream"
      value_and_operation_factory = [
          (
              FileVal("other/../other/file.txt"),
              lambda attribute_path, _: UploadFile(
                  attribute_path,
                  ext="txt",
                  file_path=os.getcwd() + "/other/file.txt",
              ),
          ),
          (
              FileVal.from_stream(StringIO(a_text)),
              lambda attribute_path, tmp_uploaded_file: UploadFile(
                  attribute_path,
                  ext="txt",
                  tmp_file_name=tmp_uploaded_file,
              ),
          ),
          (
              FileVal.from_stream(BytesIO(a_binary)),
              lambda attribute_path, tmp_uploaded_file: UploadFile(
                  attribute_path,
                  ext="bin",
                  tmp_file_name=tmp_uploaded_file,
              ),
          ),
      ]
  
      for value, operation_factory in value_and_operation_factory:
          with tmp_context() as tmp_upload_dir:
              processor = MagicMock()
              processor._operation_storage = PropertyMock(
                  upload_path=Path(tmp_upload_dir)
              )
              processor._get_operation_processor.return_value = (
                  processor
              )
              get_operation_processor.return_value = processor
  
              with self._exp() as exp:
                  path, wait = (
                      self._random_path(),
                      self._random_wait(),
                  )
                  var = File(exp, path)
                  var.assign(value, wait=wait)
  
                  if value.file_type is not FileType.LOCAL_FILE:
                      tmp_uploaded_file = get_tmp_uploaded_file_name(
                          tmp_upload_dir
                      )
                      self.assertTrue(os.path.exists(tmp_uploaded_file))
                  else:
                      tmp_uploaded_file = None
  
                  processor.enqueue_operation.assert_called_with(
                      operation_factory(path, tmp_uploaded_file),
                      wait=wait,
                  )
  
imports: import os
  import unittest
  from io import BytesIO, StringIO
  from pathlib import Path
  from unittest.mock import PropertyMock
  from mock import MagicMock, patch
  from neptune.attributes.atoms.file import File, FileVal
  from neptune.attributes.file_set import FileSet, FileSetVal
  from neptune.common.utils import IS_WINDOWS
  from neptune.envs import NEPTUNE_CLEAN_INTERNAL_DATA, NEPTUNE_DISABLE_PARENT_DIR_DELETION
  from neptune.internal.operation import UploadFile, UploadFileSet
  from neptune.internal.types.file_types import FileType
  from tests.e2e.utils import tmp_context
  from tests.unit.neptune.new.attributes.test_attribute_base import TestAttributeBase
label_desc: Use image node_id 1 for calling the TestFile obj's underlying member method code with example usage: obj.test_assign(get_operation_processor) and returns: uploaded_files