Exemplo n.º 1
0
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")
Exemplo n.º 2
0
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")
Exemplo n.º 3
0
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")
Exemplo n.º 4
0
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")