def test_unit__get_output_validation_error__ok__exception_transmitted(
            self, serpyco_processor: SerpycoProcessor) -> None:
        serpyco_processor.set_schema(UserSchema)
        validation_error = serpyco_processor.get_output_validation_error(
            {"name": 42})

        assert validation_error.original_exception
    def test_unit__load_files_input__ok__one_file(
            self, serpyco_processor: SerpycoProcessor) -> None:
        serpyco_processor.set_schema(OneFileSchema)
        input_data = serpyco_processor.load_files_input({"file1": b"42"})

        assert isinstance(input_data, OneFileSchema)
        assert b"42" == input_data.file1
    def test_unit__get_input_files_validation_error__ok__missing_one_file(
            self, serpyco_processor: SerpycoProcessor) -> None:
        serpyco_processor.set_schema(OneFileSchema)
        error = serpyco_processor.get_input_files_validation_error({})

        assert {"file1": "data is missing"} == error.details
        assert "Validation error of input data" == error.message
    def test_unit__load_files_input__error__none_file_given(
            self, serpyco_processor: SerpycoProcessor) -> None:
        serpyco_processor.set_schema(OneFileSchema)

        with pytest.raises(OutputValidationException):
            serpyco_processor.load_files_input({"file1": None})