You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have some integration tests where I do want to run some commands, but mock out the others.
Obviously I can just factor the code in a way that would let me monkey patch some functions but I'm curious if MockContext has supports this ootb.
For example, I can't do something like this can I? Or can I extend MockContext with this functionality somehow?
ctx = MockContext(
run={
"my cmd 1": Result(stdout="mock output"),
"my cmd 3": Result(stdout="mock output"),
},
# Run the cmd for real in this block
actually_run={
"my cmd 2": Result(stdout="mock output"),
}
)
The text was updated successfully, but these errors were encountered:
I have some integration tests where I do want to run some commands, but mock out the others.
Obviously I can just factor the code in a way that would let me monkey patch some functions but I'm curious if MockContext has supports this ootb.
For example, I can't do something like this can I? Or can I extend MockContext with this functionality somehow?
The text was updated successfully, but these errors were encountered: