Supporta utente target per percorsi watchdog
This commit is contained in:
23
tests/test_paths.py
Normal file
23
tests/test_paths.py
Normal file
@@ -0,0 +1,23 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from pathlib import Path
|
||||
|
||||
from bakrest.paths import expand_path
|
||||
|
||||
|
||||
def test_expand_path_uses_target_user_for_userprofile() -> None:
|
||||
assert expand_path("%USERPROFILE%\\Documents", "pettirosso") == Path(
|
||||
"C:/Users/pettirosso/Documents"
|
||||
)
|
||||
|
||||
|
||||
def test_expand_path_uses_target_user_for_appdata() -> None:
|
||||
assert expand_path("%APPDATA%\\Microsoft", ".\\pettirosso") == Path(
|
||||
"C:/Users/pettirosso/AppData/Roaming/Microsoft"
|
||||
)
|
||||
|
||||
|
||||
def test_expand_path_uses_target_user_for_temp() -> None:
|
||||
assert expand_path("%TEMP%", "pettirosso") == Path(
|
||||
"C:/Users/pettirosso/AppData/Local/Temp"
|
||||
)
|
||||
Reference in New Issue
Block a user