def test_move_file_software(): test = f"/Users/{user}/Downloads/test.exe" Path(test).touch() move_files(["test.exe"]) actual = os.path.isfile(f"/Users/{user}/Downloads/software/test.exe") expected = True assert actual == expected os.remove(f"/Users/{user}/Downloads/software/test.exe")
def test_move_file_document(): test = f"/Users/{user}/Downloads/test.txt" Path(test).touch() move_files(["test.txt"]) actual = os.path.isfile(f"/Users/{user}/Downloads/documents/test.txt") expected = True assert actual == expected os.remove(f"/Users/{user}/Downloads/documents/test.txt")
def test_move_file_media(): test = f"/Users/{user}/Downloads/test.jpg" Path(test).touch() move_files(["test.jpg"]) actual = os.path.isfile(f"/Users/{user}/Downloads/media/test.jpg") expected = True assert actual == expected os.remove(f"/Users/{user}/Downloads/media/test.jpg")
def test_move_file_others(): test = f"/Users/{user}/Downloads/test.zip" Path(test).touch() move_files(["test.zip"]) actual = os.path.isfile(f"/Users/{user}/Downloads/others/test.zip") expected = True assert actual == expected os.remove(f"/Users/{user}/Downloads/others/test.zip")