I am writing a clojure.test unit test for a rather large function in my application. This function makes several calls to db and external REST services and does some computation. for example, my function to be tested is like so
(defn myfunc [id]
(let[
w (some-security-call id)
x (some-db-call id)
y (some-REST-call x)
z ( some-audit-call y)
]
(-> y :somekey )))
for the purpose of testing this method, I want to stub out or redefine "some-audit-call" and "some-security-call". Clojure's with-redefs-fn only redefines one method at one time.
Is there a standad way to mock out multiple functions used in a function being unit tested?