I need to write a test for a function that writes into a file as follows:
with open(name=ccf.status_dir_path + '/' + script_normalized, mode='w') as outfile:
outfile.write(str(datetime.datetime.now()))
Of course I would like to avoid the file to be created, so I need to monkeypatch "open", but since "open" doesn't belong to any class or module I do not know what to give as first parameter to
monkeypatch.setattr(??, "open", patched_open)