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

Method test_count_sessions_after_save

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

Source from the content-addressed store, hash-verified

567 assert count_sessions() == 0
568
569 def test_count_sessions_after_save(self, tmp_path, monkeypatch):
570 import openosint.session_history as sh
571
572 monkeypatch.setattr(sh, "HISTORY_DIR", tmp_path / "history")
573 from openosint.session_history import SessionRecord, count_sessions, save_session
574
575 save_session(SessionRecord(timestamp="2026-05-17T10:00:00", duration_seconds=5))
576 save_session(SessionRecord(timestamp="2026-05-17T11:00:00", duration_seconds=10))
577 assert count_sessions() == 2
578
579 def test_load_limit_respected(self, tmp_path, monkeypatch):
580 import openosint.session_history as sh

Callers

nothing calls this directly

Calls 3

save_sessionFunction · 0.90
SessionRecordClass · 0.90
count_sessionsFunction · 0.90

Tested by

no test coverage detected