MCPcopy Create free account
hub / github.com/OpenOSINT/OpenOSINT / test_load_newest_first

Method test_load_newest_first

tests/test_tools.py:620–629  ·  view source on GitHub ↗
(self, tmp_path, monkeypatch)

Source from the content-addressed store, hash-verified

618 assert clear_sessions() == 0
619
620 def test_load_newest_first(self, tmp_path, monkeypatch):
621 import openosint.session_history as sh
622
623 monkeypatch.setattr(sh, "HISTORY_DIR", tmp_path / "history")
624 from openosint.session_history import SessionRecord, load_sessions, save_session
625
626 save_session(SessionRecord(timestamp="2026-05-17T09:00:00", duration_seconds=1))
627 save_session(SessionRecord(timestamp="2026-05-17T11:00:00", duration_seconds=2))
628 sessions = load_sessions()
629 assert sessions[0]["duration_seconds"] == 2

Callers

nothing calls this directly

Calls 3

save_sessionFunction · 0.90
SessionRecordClass · 0.90
load_sessionsFunction · 0.90

Tested by

no test coverage detected