Can you explain further? What do you mean when you say you "need to test the function using unittest.mock"? Is the function really as simple as the code you've shown? Do you really mean you're testing something else and you need to provide a mocked implementation of this function?
Can you show the kinds of tests you're trying to write?
At this point, it's really not clear what you're trying to do.
Can you show the kinds of tests you're trying to write?
At this point, it's really not clear what you're trying to do.