Parties to a question in difference which might be subject to a civil action may, without action, agree upon a case containing the facts upon which the controversy depends and present a submission of the same to any court which would have jurisdiction if an action had been brought, but it must appear by affidavit that the controversy is real and the proceedings in good faith to determine the rights of the parties.
§ 27-7-101, MCA