def inner(master_mock): try: internal_module.my_fn() except RuntimeError as e: eq_(str(e), 'called external_fn_a()') eq_(master_mock.mock_calls, []) raise
def inner(master_mock): internal_module.my_fn() eq_(master_mock.mock_calls, [ call.external_fn_a(), call.external_fn_b(), call.internal_fn_a(), call.internal_fn_b()])
def inner(master_mock): internal_module.my_fn() eq_(master_mock.mock_calls, [ call.external_fn_a(), call.external_fn_b(), call.internal_fn_a(), call.internal_fn_b() ])
def test_no_patch(): try: internal_module.my_fn() except RuntimeError as e: eq_(str(e), 'called external_fn_a()') raise