Refactor digitador bot and add runtime monitoring
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from pathlib import Path
|
||||
|
||||
from bot_digitador.core.coords import DEFAULT_APP_PATH, resolve_app_path
|
||||
|
||||
|
||||
def test_default_app_path_uses_current_user_home():
|
||||
assert Path(DEFAULT_APP_PATH) == Path.home() / "Documents" / "IT SaludTotal.lnk"
|
||||
|
||||
|
||||
def test_app_path_expands_worker_user_profile(monkeypatch):
|
||||
monkeypatch.setenv("USERPROFILE", r"C:\Users\worker-02")
|
||||
|
||||
resolved = resolve_app_path(r"%USERPROFILE%\Documents\IT SaludTotal.lnk")
|
||||
|
||||
assert resolved == r"C:\Users\worker-02\Documents\IT SaludTotal.lnk"
|
||||
Reference in New Issue
Block a user