I have a problem with replace variable inside method which i have to test, namely:
def find_files(path):
path_dir = os.listdir(path)
...
and for needs of test I have to replace path_dir from real result of os.listdir to some test list i.e. ['whatever1.txt', 'whatever2.txt', 'whatever3.txt']
How to do it? BR, Damian
patchfunctionality ofpytest-mock.