I am writing unit tests for a function, f, which imports other functions/classes which the unit test does not (directly) interact with. Is there any way I can patch those functions from the unit test (maybe in set_up())?
For reference, I am using Python 2.7.
From the unittest, I want to modify/patch the behavior of helper.
In unittest file:
def test_some_function():
assert(some_function() == True)
In some_function() definition
import helper
def some_function():
foo = helper.do_something()
return foo & bar