/protocols - Section 9.1: Mock Objects (2024-01-12)
zihanltesla opened this issue · comments
Zihan Liu commented
Hi!
I think "fakeit" can better discribe the feature of the intend here:
def fixit(name, func=None, value=None):
assert name in globals()
fake = Fake(func, value)
globals()[name] = fake
return fake
In my understanding we want exactly to replace the original function in the global environment to a fake object? Thanks!