def test_function2(self): func1_value = 5 with patch("module2.function1", return_value=func1_value) as patched_func1: function2_value = function2() assert function2_value == 2 * func1_value
def function1(): module2.function2()
def module_two(): import module2 print("\n\n2. START module 2\n") module2.function2()