def METHOD_NAME(mocker):
    dirname, paths = "dir", ["a.txt", "b.txt"]
    mocker.patch("os.listdir", return_value=paths)
    mocker.patch("os.path.abspath", return_value=dirname)
    expected = [os.path.join(dirname, path) for path in paths]
    assert files.listdir("directory") == expected