def METHOD_NAME(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))
            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
                )