apps.my_module.py
def my_func(name: str) -> str:
if name == 'a':
return 'name is a'
elif name == 'b':
return 'name is b'
else:
return 'not defined'
I want to mock my_func in tests.py
the mocked function return value for a is name is AA not name is a, but the return value for b and else must stay the same
I want to do this using unittest, how to do this?