Модульная перестройка хаба: ядро + модуль jira (#87) #88

Merged
aep merged 23 commits from feat/87-modules into main 2026-10-23 22:42:15 +03:00
Showing only changes of commit 751ae885db - Show all commits

View File

@ -753,6 +753,26 @@ def test_tick_sweeps_files_once_a_day(hub, tmp_path, monkeypatch):
assert len(calls) == 2
def test_tick_sweeps_downloads_once_a_day(hub):
h = hub["hub"]
old = time.time() - 31 * 86400
def put_old(name):
d = h.db_path.parent / "downloads" / name
d.mkdir(parents=True)
(d / "a.png").write_bytes(b"x")
os.utime(d / "a.png", (old, old))
os.utime(d, (old, old))
return d
first = put_old("1")
h.tick()
assert not first.exists() and "downloads_at" in h.module_state["jira"]
second = put_old("2")
h.tick()
assert second.exists() # второй тик в те же сутки — без уборки
def test_tick_sweep_failure_logged_auto_refresh_still_runs(hub, monkeypatch, caplog, add_project):
_add_project(hub, add_project)
def broken(*args, **kwargs):