def METHOD_NAME(self, attach):
    input_file = InputFile("contents", attach=attach)
    if attach:
        assert isinstance(input_file.attach_name, str)
        assert input_file.attach_uri == f"attach://{input_file.attach_name}"
    else:
        assert input_file.attach_name is None
        assert input_file.attach_uri is None